Method for transmitting data within a communication system

ABSTRACT

Method for transmitting data within a communication system, the communication system comprising a communication media and a number of nodes connected to the communication media, the data being transmitted across the communication media within a communication cycle comprising a number of time slots assigned to one or more nodes of the communication system. In order to provide a possibility for a data transmission within communication cycles, which can satisfy the demands in communication systems for safety critical applications, too, it is suggested, that the communication cycle is initiated by an external event. The external event can be caused by manually setting a bit by a host, by a configurable timer in a controller host interface (CHI) or by an external trigger.

[0001] This application is a continuation of PCT/EP03/03991 filed onApr. 16, 2003 and claims Paris Convention priority of EP 02 008 171.7and DE 102 16 984.5 both filed on Apr. 16, 2002 the entire disclosure ofwhich are all hereby incorporated by reference.

BACKGROUND OF THE INVENTION

[0002] The present invention refers to a method for transmitting datawithin a communication system, the communication system comprising acommunication media and a number of nodes connected to the communicationmedia. The data is transmitted across the communication media within acommunication cycle comprising a number of time slots assigned to one ormore nodes of the communication system.

[0003] Furthermore, the invention refers to a computer program, which isable to run on a computer, in particular on a microprocessor.

[0004] Moreover, the present invention refers to one of a number ofnodes of a communication system. The nodes are connected to acommunication media for transmitting data among the nodes. The data istransmitted across the communication media within communication cycleseach comprising a number of time slots assigned to one or more nodes ofthe communication system.

[0005] Finally, the invention refers to a communication systemcomprising a communication media and nodes connected to thecommunication media. Data is transmitted among the nodes across thecommunication media within communication cycles each comprising a numberof time slots assigned to one or more nodes of the communication system.

[0006] Time triggered communication systems are known in the art.Generally, they comprise a communication media, which for example is adata bus. Various nodes are connected to the communication media. Eachnode comprises a host controller, a communication controller, a busdriver and optionally a bus guardian. Data can be transmitted across atime triggered communication system according to various protocols. Anexample of such a protocol is TTCAN (Time Triggered Controller AreaNetwork).

[0007] In time-triggered communication systems, data transmission iseffected in communication cycles, which comprise various time slotsassigned to the nodes of the communication system. Each node can senddata across the communication media within the timeslots assigned to thenode. Which timeslots are assigned to which nodes is part of acommunication media access scheme. If a node wants to transmit data thedata is brought into a format specified in the protocol used. Formattingthe data is effected by the communication controller of the node. Fromthere the formatted data is forwarded to the bus driver, whichtranslates the formatted data into electrical signals which then areapplied to the communication media within the timeslots assigned to thenode.

[0008] However, these communication systems in some cases do not satisfythe requirements for safety critical applications, such as X-by-wiresystems in vehicles. It is an important requirement for thefunctionality of these applications that data can be transmitted with aslittle time delay as possible whenever a predefined event occurs. If forexample in a vehicle with a brake-by-wire system the driver of thevehicle activates the brake pedal, an appropriate signal indicating thedriver's wish to reduce the speed of the vehicle has to be transmittedto a controller unit of the brake-by-wire system, which calculatessignals for the brake actuators assigned to the wheels of the vehicle.The signals are transmitted from a sensor of the brake pedal to thecontroller unit and from the controller unit to the brake actuatorsacross the communication media. The earlier the signals reach theirdestination the earlier the brakes are activated and the shorter thebraking distance is.

[0009] Therefore, it is an object of the present invention to provide apossibility for a data transmission within communication cycles, whichcan satisfy the demands in communication systems for a fast datatransmission upon occurrence of a predefined event.

SUMMARY OF THE INVENTION

[0010] To solve this object according to the present invention a methodof the above mentioned kind is suggested, characterized in that thecommunication cycle is initiated by an internal or an external event.

[0011] According to the present invention data transmission is effectedwithin communication cycles comprising a number of time slots assignedto one or more nodes of the communication system. However, thecommunication cycles are not necessarily repeated periodically, butrather are initiated whenever a certain external or internal eventoccurs. This means that the communication system is not run in atime-triggered mode but rather in ae so-called event-triggered mode. Inthe event-triggered mode the execution of a communication cycle issuspended until an event has occurred.

[0012] An external event, for example, can be the crank shaft reachingits top dead center. This can be detected by an appropriate sensor,which emits a trigger signal every time the crank shaft passes the topdead center. The trigger signal is applied externally to one or more ofthe nodes and initiates a communication cycle, in which the nodes of thecommunication system can transmit data in the time slots assigned tothem, if they want to transmit data and if they are authorized to.

[0013] An internal event can be synthesized by the host controller insome programmatic way. The internal event could be, for example, asignal received from a timer, which occurs after a predefined time if noexternal event occurs. So if in this case an external event neveroccurs, a communication cycle is initiated repeatedly by the timersignal and the communication system can be run in a periodic-likemanner, which is similar to the time-triggered mode.

[0014] The internal event can be caused by manually setting a bit by thehost or by a configurable timer in the controller host interface (CHI).The communication cycle is divided up into a network communication timeat the beginning and a network idle time at the end of the cycle(communication cycle level). The network communication time comprises astatic segment, a dynamic segment, a cycle gap and a symbol window(communication segment level). Each of the static segment, the dynamicsegment, the cycle gap and the symbol window comprise a number ofminislots (arbitration grid level). The minislots each comprise a numberof macroticks (macrotick level), which on their part each comprise anumber of microticks (microtick level).

[0015] According to a preferred embodiment of the invention, it issuggested that one of the nodes of the communication system is definedas a master node which initiates the communication cycle upon receipt orgeneration of a predetermined trigger signal. Which of the nodes is toact as the master node can be predefined during startup or during areset of the communication system. Alternatively it can be dynamicallydefined during run-time. If the trigger signal is received or generatedby the master node a new communication cycle is started and data can betransmitted within the time slots of this communication cycle.

[0016] Furthermore, it is suggested that execution of a communicationcycle is suspended until the master node receives the trigger signal. Inthat case the communication cycle is initiated by an external triggersignal.

[0017] Alternatively, it is suggested that execution of a communicationcycle is suspended until the master node generates the trigger signal oruntil a predetermined period of time has elapsed. In that case thecommunication cycle is initiated by an internal trigger signal.

[0018] According to yet another preferred embodiment of the presentinvention it is suggested that the master node upon receipt orgeneration of the trigger signal issues an event indication signal, theother nodes of the communication system defined as slave nodes receivethe event indication signal and resume execution of the communicationcycle upon reception of the event indication signal.

[0019] Furthermore, it is suggested that the communication cyclecomprises a cycle gap, the nodes enter the cycle gap and suspendexecution of the communication cycle, the master node issues the eventindication signal, the slave nodes receive the event indication signaland resume execution of the communication cycle upon receipt of theevent indication signal. Preferably, the event indication signal is usedfor synchronizing the slave nodes. All subsequent timing is based onnominal (uncorrected) macroticks based on a timing grid that is set upby the arrival time of the event indication signal.

[0020] The cycle gap is disposed within the communication cycle afterthe static and the dynamic segment and before a symbol window and aNetwork Idle Time (NIT). Having entered the cycle gap, the nodes waitfor an Event Indication Signal (EIS) from the master node. Uponreception of the EIS the nodes complete the communication cycle whichwas interrupted. Thereafter, all the slave nodes start a newcommunication cycle at the same time. This is achieved by all slavenodes receiving the EIS and using the EIS for synchronization purposes.

[0021] Moreover, it is suggested that the event indication signal isdefined as a low/high/low sequence, whereas the high/low transition isused as a synchronizing event for the slave nodes. Starting from busidle the event indication signal falls to low (logical 1), rises to high(logical 0), falls again to low (logical 1) and finally rises again toidle. The second falling edge of the event indication signal is used assynchronization event on the master and slave nodes.

[0022] If a slave node is connected to more than one channel, it issuggested that the first valid reception of the event indication signalby one of the slave nodes is used for synchronizing the slave node. Whena slave node recognizes the reception of a valid event indicationsignal, a timer is initialized at the synchronization event point withthe configuration value which quantifies the duration between thesynchronization event point of the received event indication signal andthe end of the network idle time. When the timer expires at the end ofthe predetermined time period a new communication cycle is started, theslave nodes initialize the macrotick and microtick counters, and a localcycle counter is incremented. Afterwards the slave node waits to receivethe frame with a predefined identification (ID). That frame is specifiedand recognized as Synch Frame.

[0023] According to yet another preferred embodiment of the invention itis suggested that the trigger signal is generated in the master node.For example, the trigger signal can be generated by a configurable timerto initiate periodic communication cycles. Alternatively it is suggestedthat the trigger signal is applied to the master node from an externalunit outside the master node. In that case the master node comprises adirect hardware input to trigger the communication cycle by an externalhardware pin.

[0024] The advantage of this preferred embodiment in the following isdescribed considering an example. For controlling an engine of avehicle, the communication cycle is used for transmitting information toan appropriate control unit. Certain information (e.g. the measuredvalue of a nitrogen oxide (NOx)-Sensor) is transmitted at a predefinedposition within the communication cycle. At the same time, theinformation may be obtained depending on an angle of the crank shaft ofthe engine (e.g. the NOx-value may be obtained at 60° of the crankshaft). If the engine runs at a relatively high rotational speed (e.g.6.000 rotations per minute (rpm)), every time the crank shaft anglepasses 0° or 360° respectively a communication cycle is triggered withthe desired information at the predefined position. However, if theengine runs at a lower rotational speed (e.g. 2.000 rpm), a situationcould arise in which the distance between two communication cyclestriggered by the external event (crank shaft angle passes 0° or 360°) istoo long and in which the control unit's need for ongoing informationcan no longer be satisfied. In that case, and of course in many othercases, too, instead of the external triggering event a timer signal canbe used as an internal triggering event. The timer can be set in orderto trigger communication cycles often enough to provide the control unitwith up to date information as often as needed. In that case, it couldhappen that an up to date NOx-value is not available for everycommunication cycle, because the NOx-value is obtained depending on thecrank shaft angle. Therefore, for example, only the NOx-value istransmitted only in every third communication cycle.

[0025] It is further suggested that the communication cycle comprises astatic segment with time slots of a predefined size and in a predefinedorder. Furthermore, it is suggested that the communication cyclecomprises a dynamic segment with time slots of a variable size and in avariable order. Of course, a communication cycle can comprise both thestatic segment and the dynamic segment. The dynamic segment can have agiven size. This means that temporally viewed the dynamic segment hasthe same size in each communication cycle.

[0026] However, the number and the length of the frames transmitted inthat segment can vary. This means that the number of minislots can vary,if minislots pass unused for certain IDs. It is suggested that thenumber and the length of the frames transmitted in the dynamic segmentis dynamically defined during run-time. Preferably, the number andlength of the frames is dynamically defined for each communicationcycle. This embodiment of the invention gives the possibility to adaptthe amount of data to be transmitted within the dynamic segmentaccording to the actual demands. If little or no data is to betransmitted in the dynamic segment, the number and/or the length of theframes transmitted in the dynamic segment can be reduced. If, however,more data is to be transmitted in the dynamic segment, the number and/orthe length of the frames transmitted in the dynamic segment can beraised.

[0027] Furthermore, the above-mentioned object is achieved by a computerprogram of the above-mentioned kind, characterized in that, the computerprogram is programmed in order to execute a method according to thepresent invention.

[0028] According to a preferred embodiment it is suggested that thecomputer program is stored on a read-only-memory (ROM), on arandom-access-memory (RAM) or on a flash-memory.

[0029] Moreover, the above-mentioned object is achieved by a node of acommunication system of the above-mentioned kind, characterized in thatthe node comprises means for receiving an external or an internal eventand means for initiating a communication cycle upon receipt of theexternal or internal event.

[0030] According to a preferred embodiment of the invention it issuggested that the node comprises means for receiving a predefinedexternal trigger signal and that the means for initiating thecommunication cycle initiate the communication cycle upon receipt of thetrigger signal. The node comprises input means (e.g. a pin) forreceiving the trigger signal from an external unit outside the node.

[0031] Furthermore, it is suggested that the node comprises means forinternally generating the trigger signal. The internal trigger signalcan be generated by manually setting a bit by the host or by aconfigurable timer in the controller host interface (CHI).

[0032] According to yet another preferred embodiment of the invention itis suggested that the node comprises means for executing the methodaccording to the present invention.

[0033] Finally, the above-mentioned object is achieved by acommunication system of the above-mentioned kind, characterized in thatthe node comprises means for receiving an external or an internal eventand means for initiating a communication cycle upon receipt of theexternal or internal event.

[0034] According to a preferred embodiment of the invention it issuggested that the communication system comprises means for executingthe method according to the present invention.

[0035] These and other features, aspects and advantages of the presentinvention will become better understood with reference to the followingdetailed description, appended claims, and accompanying drawings,wherein:

BRIEF DESCRIPTION OF THE DRAWING

[0036]FIG. 1 illustrates a communication system according to the presentinvention with a dual channel bus configuration;

[0037]FIG. 2 illustrates a communication system according to the presentinvention with a dual channel single star configuration;

[0038]FIG. 3 illustrates a communication system according to the presentinvention with a single channel cascaded star configuration;

[0039]FIG. 4 illustrates a communication system according to the presentinvention with a dual channel cascaded stars configuration;

[0040]FIG. 5 illustrates a communication system according to the presentinvention with a single channel hybrid configuration;

[0041]FIG. 6 illustrates a communication system according to the presentinvention with a dual channel hybrid configuration;

[0042]FIG. 7 illustrates timing hierarchy levels within a communicationcycle for data transmission within the communication system;

[0043]FIG. 8 illustrates a time base triggered communication cycle fordata transmission within the communication system;

[0044]FIG. 9 illustrates possible transmission patterns for a singlenode within a static segment of the communication cycle;

[0045]FIG. 10 illustrates detailed timing of a static slot within thestatic segment of a communication cycle;

[0046]FIG. 11 illustrates an overview of a dynamic segment of acommunication cycle;

[0047]FIG. 12 illustrates a detailed timing within a minislot of acommunication cycle;

[0048]FIG. 13 illustrates a detailed timing within a dynamic segment ofa communication cycle;

[0049]FIG. 14 illustrates a detailed timing at the boundary between astatic segment and a dynamic segment of a communication cycle;

[0050]FIG. 15 illustrates a detailed timing within a symbol window of acommunication cycle;

[0051]FIG. 16 illustrates a sender/receiver interface of a communicationcontroller of a node of the communication system;

[0052]FIG. 17 illustrates a byte coding;

[0053]FIG. 18 illustrates a frame coding in a static segment of acommunication cycle;

[0054]FIG. 19 illustrates a frame coding in a dynamic segment of acommunication cycle;

[0055]FIG. 20 illustrates a bit stream of a status normal symbol (SNS);

[0056]FIG. 21 illustrates a bit stream of a status alarm symbol (SAS);

[0057]FIG. 22 illustrates a bit stream of a collision avoidance symbol(CAS);

[0058]FIG. 23 illustrates a bit stream of a sequence of two wake-upsymbols (WUS);

[0059]FIG. 24 illustrates a block diagram of a bit stream decoding unitof a node of the communication system;

[0060]FIG. 25 illustrates a mechanism for determining an initial edgedetection window when a frame is received;

[0061]FIG. 26 illustrates a mechanism for detecting a falling edge inthe middle of a first byte start sequence (BSS);

[0062]FIG. 27 illustrates a mechanism for determining an edge detectionwindow;

[0063]FIG. 28 illustrates a bit clock alignment according to a firstexample;

[0064]FIG. 29 illustrates a bit clock alignment according to a secondexample;

[0065]FIG. 30 illustrates a bit clock alignment according to a thirdexample;

[0066]FIG. 31 illustrates an example of a bit sampling for bitscomprising 10 samples;

[0067]FIG. 32 illustrates a mechanism for a resynchronization of bitsampling;

[0068]FIG. 33 illustrates an example for a bit value voting mechanism;

[0069]FIG. 34 illustrates an overview of a FlexRay frame format;

[0070]FIG. 35 illustrates an overview of a byteflight frame format;

[0071]FIG. 36 illustrates a frame reception state diagram;

[0072]FIG. 37 illustrates a frame acceptance timing in a static segmentof a communication cycle;

[0073]FIG. 38 illustrates a frame acceptance timing in a dynamic segmentof a communication cycle;

[0074]FIG. 39 illustrates a diagram with local timing of three nodes andtheir relation to each other;

[0075]FIG. 40 illustrates a relative execution timing of a clocksynchronization mechanism;

[0076]FIG. 41 illustrates a node internal execution of clocksynchronization procedures;

[0077]FIG. 42 illustrates a time difference measurement (expected vs.observed arrival times);

[0078]FIG. 43 illustrates an algorithm for clock correction valuecalculation;

[0079]FIG. 44 illustrates a timing of measurement and correction;

[0080]FIG. 45 illustrates an assessment of a calculated rate correctionvalue;

[0081]FIG. 46 illustrates an assessment of a calculated offsetcorrection value;

[0082]FIG. 47 illustrates a global structure of a wakeup procedure;

[0083]FIG. 48 illustrates a structure of a wakeup channel monitoringprocedure;

[0084]FIG. 49 illustrates a structure of a wakeup pattern transmissionprocedure;

[0085]FIG. 50 illustrates a global structure of a startup procedure;

[0086]FIG. 51 illustrates a structure of a channel monitoring and of aselection of a startup path;

[0087]FIG. 52 illustrates a structure of a selection of a cold startinitiator;

[0088]FIG. 53 illustrates a structure of a check on a successfullyestablished communication;

[0089]FIG. 54 illustrates a structure of an initial synchronization;

[0090]FIG. 55 illustrates a structure of a check on a successfulintegration;

[0091]FIG. 56 illustrates a global structure of a protocol statediagram;

[0092]FIG. 57 illustrates a structure of a communication controllerwakeup state machine of a node of the communication system;

[0093]FIG. 58 illustrates a simple wakeup, whereas the larger amount oftimes within a millisecond-range are represented by dotted lines;

[0094]FIG. 59 illustrates a simple wakeup with forwarding, whereas thelarger amount of times within a millisecond-range are represented bydotted lines;

[0095]FIG. 60 illustrates a listen-timeout of a first timer valuevdStartup;

[0096]FIG. 61 illustrates listen-timeouts of a second timer valuevdStartupNoise;

[0097]FIG. 62 illustrates a startup state diagram in a time triggeredprotocol mode;

[0098]FIG. 63 illustrates a startup state diagram in a byteflightprotocol mode;

[0099]FIG. 64 illustrates a diagram of a collision-free startup;

[0100]FIG. 65 illustrates a diagram of a startup with a collision on acollision avoidance symbol;

[0101]FIG. 66 illustrates a diagram of a startup with a validation checkin a CC_IntegrationVCW state failed, in which state a node of thecommunication system does not schedule any transmission;

[0102]FIG. 67 illustrates a state transition diagram of a communicationcontroller of a node of the communication system;

[0103]FIG. 68 illustrates a state transition diagram of a bus driver ofa node of the communication system (the optical bus guardian states arenot shown);

[0104]FIG. 69 illustrates a state transition diagram of an optical busdriver of a node of the communication system;

[0105]FIG. 70 illustrates a state transition diagram of a bus guardianof a node of the communication system;

[0106]FIG. 71 illustrates a state transition diagram of an active starcommunication system topology;

[0107]FIG. 72 illustrates an error management state transition diagramfor a time-triggered distributed protocol mode and a time-triggeredmaster-controlled protocol mode;

[0108]FIG. 73 illustrates an error management state transition diagramfor a byteflight protocol mode;

[0109]FIG. 74 illustrates a conceptual architecture of a controller hostinterface of a node of the communication system;

[0110]FIG. 75 illustrates a state diagram of a controller hostinterface;

[0111]FIG. 76 illustrates interactions of controller host interfaceservices with controller host interface elements;

[0112]FIG. 77 illustrates a bus driver—communication controllerinterface of a node of the communication system;

[0113]FIG. 78 illustrates a bus driver-bus guardian interface;

[0114]FIG. 79 illustrates behavior of two signals RxD and RxEN forreceiving a data frame transmitted in a static segment of thecommunication cycle according to a first example;

[0115]FIG. 80 illustrates behavior of two signals RxD and RxEN forreceiving a data frame according to a second example;

[0116]FIG. 81 illustrates required timing of two signals TxD and TxENfor transmitting a data frame;

[0117]FIG. 82 illustrates a block diagram of a busguardian-communication controller interface;

[0118]FIG. 83 illustrates a bus guardian schedule overview;

[0119]FIG. 84 illustrates a bus guardian-communication controller timingduring a static segment of a communication cycle;

[0120]FIG. 85 illustrates a bus guardian-communication controller timingat the beginning of a dynamic segment of a communication cycle accordingto a first example;

[0121]FIG. 86 illustrates a bus guardian-communication controller timingat the beginning of a dynamic segment of a communication cycle accordingto a second example;

[0122]FIG. 87 illustrates a bus guardian-communication controller timingduring a bus guardian symbol window and a bus guardian watchdog disabletime;

[0123]FIG. 88 illustrates a structure of a bus guardian schedulemonitor;

[0124]FIG. 89 illustrates a bus guardian schedule monitor state machine;

[0125]FIG. 90 illustrates interaction in a static segment of acommunication cycle;

[0126]FIG. 91 illustrates interaction in a static segment of acommunication cycle with a minimum length of inter-slot gaps;

[0127]FIG. 92 illustrates interaction in a dynamic segment of acommunication cycle with a symbol window disabled;

[0128]FIG. 93 illustrates interaction in a symbol window and in anetwork idle time;

[0129]FIG. 94 illustrates FlexRay communication cycle operating modes;

[0130]FIG. 95 illustrates an event triggered communication handling in ahost controller, a controller host interface and in a communicationcontroller of a node of the communication system;

[0131]FIG. 96 illustrates a timing hierarchy in the view of a masternode of the communication system;

[0132]FIG. 97 illustrates a communication cycle execution from the viewof a master node and a slave node;

[0133]FIG. 98 illustrates a trigger condition in an event indicationsignal;

[0134]FIG. 99 illustrates a monitoring of a trigger signal for thecommunication controller by a master node of the communication system;

[0135]FIG. 100 illustrates a monitoring of an event indication signal byslave nodes of the communication system;

[0136]FIG. 101 illustrates a protocol state diagram for an eventtriggered mode;

[0137]FIG. 102 illustrates internal bus events, which are indicatedexternally;

[0138]FIG. 103 illustrates an architecture of a node of thecommunication system;

[0139]FIG. 104 illustrates an example for a possible networkconfiguration;

[0140]FIG. 105 illustrates a definition of a communication cycle with astatic segment;

[0141]FIG. 106 illustrates a definition of a communication cycle in apure dynamic communication system;

[0142]FIG. 107 illustrates an example for a communication scheme of twonodes of a FlexRay communication system;

[0143]FIG. 108 illustrates a FlexRay frame format;

[0144]FIG. 109 illustrates a byteflight frame format;

[0145]FIG. 110 illustrates a transmission of a start sequence;

[0146]FIG. 111 illustrates a reception of a start sequence;

[0147]FIG. 112 illustrates a frame format for an electrical transmissionon the physical layer;

[0148]FIG. 113 illustrates a topology of a FlexRay communication systemusing active stars;

[0149]FIG. 114 illustrates a topology of a FlexRay communication systemusing a passive bus;

[0150]FIG. 115 illustrates a topology of a FlexRay communication systemusing an active star combined with a passive bus;

[0151]FIG. 116 illustrates a block chart of an electrical active star;and

[0152]FIG. 117 illustrates an overview of interfaces between a hostcontroller, a communication controller, a bus driver, a bus guardian,and a power supply of a node of the communication system.

DESCRIPTION OF THE PREFERRED EMBODIMENT

[0153] The present invention refers to a dependable automotive network.Throughout the following description the following structure isfollowed: at the beginning of each chapter (section) the requirementsfor this topic are defined, afterwards more detailed descriptions areprovided. In the description UPPER CASE letters are used to denoteconstants. All constants used in the document are listed at the end ofthe description.

[0154] Objectives

[0155] The objectives pursued in the development of the dependableautomotive network are the following:

[0156] Support of two communication paradigms, deterministic (staticallydefined) communication and dynamic event driven communication.

[0157] Configurable static and dynamic part (segment) within onecommunication cycle. Fully static and fully dynamic configuration has tobe supported.

[0158] Flexible extendibility, even after deployment.

[0159] High data rate and bandwidth efficiency.

[0160] Scalable fault tolerance (i.e., single channel and dual channeloperation must be supported).

[0161] Reliable error detection (bus guardian mechanism in the timedomain, cyclic redundancy check (CRC) in the value domain).

[0162] Support of electrical and optical physical interfaces.

[0163] Enable very low system level failure in time ratings.

[0164] Allow use of crystal oscillators and low tolerance ceramicresonators.

[0165] Support of active star and bus topologies.

[0166] Low overall system cost.

[0167] Enable re-use of carry over components without embeddingknowledge of future platform partitioning. The objectives of the staticsegment are the following:

[0168] Deterministic communication behavior in the time domain.

[0169] Global time implemented by a fault tolerant clock synchronizationalgorithm.

[0170] Immunity against accepting error-free sub-sequences of a messageas valid messages (i.e. short message rejection).

[0171] The objectives of the dynamic segment are the following:

[0172] Event driven dynamic communication possibility.

[0173] Flexible bandwidth allocation (for different nodes duringruntime).

[0174] No interference with the static segment.

[0175] Support for prioritized bus access.

[0176] Support of variable length messages with at least 200 data bytes.

[0177] The global requirements are the following:

[0178] Support for fault tolerance, but operation without faulttolerance must also be possible, i.e., a single bus (channel) connectionmust be possible for non-fault-tolerant nodes.

[0179] The communication network has to support a system architecture,where no single fault may lead to a functional degradation.

[0180] Protection against faults in accordance with a well-defined faulthypotheses.

[0181] Protect against up to and including five random bit errors perframe.

[0182] The communication protocol should be independent as far aspossible from the topology.

[0183] For highly dependable and fault-tolerant applications anindependent bus guardian to prevent the monopolization of thecommunication medium by a communication controller is required (socalled “babbling idiot”).

[0184] Errors in hardware and configuration data have to be detectedduring initialization and operation by error detection mechanisms(EDMs). In case a critical error is detected the controller andtransceiver must not be allowed to enter normal operation or immediatelyabort normal operation and report an error to the host.

[0185] Support of serviceability of system- and component-level faults.

[0186] The bit encoding technique must not introduce data dependentchanges in the length of the resulting bit stream, e.g., bit stuffing isnot allowed.

[0187] Automotive qualification of the communication controller, busguardian, and the physical layer is required.

[0188] Configuration data must be readable/writeable by the host. Itmust be possible to prohibit writing during run-time.

[0189] Support of comprehensive self test at system communicationstartup.

[0190] Support of timely and highly reliable component re-integrationand system-level startup.

[0191] Support of master-less system startup and shutdown.

[0192] Support of traceability of system- and component-level faults toidentify root causes of failures.

[0193] Support of synchronized system shutdown without errorindications.

[0194] Support of synchronous distributed application startup andshutdown with acceptable timing and fault tolerance characteristics.

[0195] Support of node and network moding with high security againstcritical inadvertant mode changes.

[0196] Logical line compatibility to the byteflight protocol, when usingan optical physical layer must be possible.

[0197] Basic Concepts

[0198] The communication protocol for the dependable automotive networkaccording to the present invention has the following properties:

[0199] Synchronous and asynchronous frame transfer.

[0200] Multi-master clock synchronization.

[0201] Guaranteed frame latency times and jitter during synchronoustransfer.

[0202] Prioritization of frames during asynchronous transfer.

[0203] Error detection and signaling.

[0204] Error containment on the physical layer through an independentbus guardian device.

[0205] Scalable fault tolerance, e.g., one controller, one/two channels,one bus guardian for each channel.

[0206] The FlexRay protocol can be divided into various layers of alayer architecture comprising the following layers:

[0207] The Physical Layer defines how signals are actually transmitted.Tasks of the Physical Layer are fault confinement and error detectionand signaling. The Physical Layer comprises a signal level, a bitrepresentation and a transmission medium. One task of the Physical Layeris to detect errors of the communication controller in the time domain.This is done by the so-called Bus Guardian.

[0208] The Transfer Layer represents the kernel of the protocol. Itpresents frames received to the presentation layer and accepts frames tobe transmitted from the presentation layer. The transfer layer isresponsible for timing, synchronization, message framing, errordetection and signaling, and fault confinement.

[0209] The Presentation layer is concerned with frame filtering andmasking, frame status handling and contains the communication controllerhost interface.

[0210] The Application layer is not part of this description.

[0211] Node (ECU) Architecture

[0212]FIG. 103 shows the architecture of a node 100 (electronic controlunit, ECU) of the communication system. Every node 100 consists of thefive sub-components host controller 101, communication controller 102,bus guardian 103, bus driver 104, and power supply 105. In the followingdescription the requirements for the communication controller 102, thebus guardian 103, the bus driver 104 and the interfaces to the host 101and the power supply 105 are described.

[0213] Two implementations for the communication controller 102 arepossible, one configuration of a communication controller 102 that sendsand receives on two redundant physical channels, and a secondconfiguration which is solely connected to one physical channel.

[0214] Topology

[0215]FIG. 104 shows a possible topology configuration of thecommunication system 106 (network). A node 100 can either be connectedto both channels 1 and 2 (node A, C, and E) or only channel 1 (node B)or only channel 2 (node D). A configuration, where all nodes 100 areconnected by one channel only is also possible.

[0216] Frame Transfer

[0217] In FlexRay media access occurs within a communication cycle.Within one communication cycle FlexRay offers the choice of two mediaaccess schemes. These are a static time division multiple access (TDMA)scheme, and a dynamic mini-slotting based scheme. Communication in thecommunication system 106 is done in a communication cycle consisting ofa static segment and a dynamic segment, where each of the segments maybe empty. The first frame ID in a system with a static segment is IDnumber 1 (see FIG. 105). In a pure dynamic system with a start of cycle(SOC) symbol (see FIG. 106). The sending slots are represented throughthe ID numbers that are the same on both channels.

[0218] The sending slots are used deterministically (in a pre-definedtime divisional multiple access (TDMA) strategy) in the static segment.In the dynamic segment there can be differences in the phase on the twochannels (see FIG. 106). Nodes 100 that are connected to both channelssend their frames in the static segment simultaneously on both channels.Two nodes, that are connected to one channel only, but not the samechannel, may share a slot in the static segment.

[0219] To guarantee the consistency of the clock synchronization onlynodes 100 can participate that send frames, which are received by allother nodes (e.g., node A, C and E in FIG. 104). All nodes execute theclock synchronization algorithm, but only the frames of the staticsegment are considered. It is possible to send different data in thesame sending slot on different channels.

[0220] The following constraints should be respected in thecommunication system 106 according to the present invention:

[0221] The communication controller 102 must allow to interface to anoptical or an electrical physical layer.

[0222] The communication controller 102 must support a net data rate ofat least 5 Mbit/s real application data transferred per seconds underthe constraints of frame overhead (including CRC) and protocol timingoverhead (inter frame gap, IFG) in static communication mode.

[0223] It must be possible to connect 2 up to a value CONTROLLER_MAXcontrollers 102 to one communication channel. CONTROLLER_MAX is themaximum number of controllers 102 connected to one communication channeland can have a value of 64, for example.

[0224] The maximum number of slots in the static segment is set toSTATIC_SLOTS_MAX. STATIC_SLOTS_MAX is the maximum number of static slotsin a static segment of a communication cycle and can have a value of4095, for example.

[0225] The power supply 105 for the bus driver 104 (including the busguardian 103) and the communication controller 102 must meet automotiverequirements.

[0226] Comment

[0227] Considering the FlexRay protocol as described in the previouspart of the description the communication scheme of networked FlexRaynodes can be briefly characterized as follows:

[0228] Each node 100 must be able to make use of the distributed clock.

[0229] Each node 100 must send frames inside a predefined static slotor/and inside the dynamic segment (collision free access)

[0230] The transmission of frames must be subdivided into 3 phases:

[0231] 1^(st) a bus guardian 103 must enable the access to the bus;

[0232] 2^(nd) it must be signalled that a frame should be transmitted;

[0233] 3^(rd) the transmission of the frame itself.

[0234] Protocol Description

[0235] Throughout the document the following notation is used:

[0236] Req: Requirements

[0237] Comment: contains additional descriptions and explanations

[0238] General Requirements

[0239] Req: The communication protocol shall be independent from thedata rate.

[0240] Comment

[0241] It shall be possible to implement low end controllers e.g., 500Kbit/s and high end controllers beyond 100 Mbit/s.

[0242] Req: The first communication controller must support a net datarate of at least 5 Mbit/s.

[0243] Comment

[0244] Net data rate: Real application data transferred per secondsunder the constraints of frame overhead (including CRC) and protocoltiming overhead (IFG) in static communication mode.

[0245] Req: A CRC code with a Hamming Distance of at least 6 must beused.

[0246] Req: The communication controller shall be able to operate in acurrent byteflight environment, i.e., the two protocol controllers haveto support the same physical interface and the same representation atthe logical line level. The byteflight compatibility is required for theoptical physical layer only.

[0247] Comment

[0248] Compatibility of the interfaces between host CPU and the protocolcontroller (CHI) is not required. The electrical physical layer does notneed to support byteflight compatibility The byteflight specificationcan be downloaded from the following web address: www.byteflight.com

[0249] Frame Transfer

[0250] Data transfer in FlexRay is done in cycles, called communicationcycles.

[0251] Req: The communication cycle consists of a static and a dynamicsegment as shown in FIG. 105. Each of the segments may be empty, thatmeans there are three possible configurations of the communication cycle(pure static, mixed static and dynamic (a mixed system consists of atleast two static slots) and pure dynamic).

[0252] In a pure dynamic system the communication cycle starts with aSOC symbol. There are two different SOC symbols (alarm condition, normalcondition). The sending slots are represented through the identifiersthat are the same on both channels (see FIG. 106).

[0253] The sending slots are used deterministically (in a pre-definedTDMA strategy) in the static segment. In the dynamic segment there canbe differences in the phase on the two channels (see FIG. 105). Nodesthat are connected to both channels send their frames in the staticsegment simultaneously on both channels. A node that is connected toonly one channel may share an identifier with another node that is onlyconnected to the other channel.

[0254] The current communication cycle is determined by a cycle counterthat is consistently incremented in every cycle (see FIG. 108).

[0255] Req: The length of the communication cycle has to be stored inthe configuration data.

[0256] Fit Criteria

[0257] The maximum cycle length is defined by CYCLE_LENGTH_MAX and canhave a value of 64 ms, for example.

[0258] Req: A check mechanism has to be designed that ensures that noframe transmission is started within a certain interval so calledforbidden region before the end of the communication cycle, to ensurethat the beginning of the static segment in the next communication cycleis not disturbed.

[0259] Req: Multiplexing of sending slots of one controller must besupported in such a way, that the contents of frames can be multiplexedfor a certain sending slot in different communication cycles.

[0260] Comment

[0261] So a communication matrix with nearly any possible communicationpatterns (periods of certain frames) based on the principle ofcommunication cycles can be built up.

[0262] Static Segment

[0263] Req: If the static segment of the communication cycle is notempty it consists of STATIC_SLOTS_MIN≦NUMBER_OF_SLOTS≦STATIC_SLOTS_MAX.

[0264] Req: The static segment is subdivided into a sequence of timeslots. In each of these static slots only one controller may send oneframe on each channel.

[0265] Comment

[0266] In the static segment of the communication cycle a TDMA mediaaccess strategy is used.

[0267] Req: There is one configuration parameter for the slot length(slot_length) in the static segment, that defines this value. The lengthof the slots is configurable off-line but fixed during runtime.

[0268] Dynamic Segment

[0269] Req: In a pure dynamic system the communication cycle starts withthe start of cycle (SOC) symbol.

[0270] Req: The dynamic segment of the communication cycle consists ofzero or more dynamic identifiers (slots) within the communication cycle.

[0271] Req: Bus access in the dynamic segment is done via static framepriorities according to the byteflight specification.

[0272] Req: In the dynamic segment the media access strategy is based onwait times (mini-slotting scheme) and the priority of identifiers.Controllers transmitting frames with higher priority identifiers sendbefore controllers transmitting lower priority frames.

[0273] Req: The frame length in the dynamic segment is variable duringruntime.

[0274] Req: In pure dynamic mode an external triggered SOC generationand with it the start of the communication cycle has to be supported.The timing behavior of the external trigger has to be monitored by thecommunication controller.

[0275] Frame Format FlexRay

[0276] Req: Two frame formats as specified below must be supported.

[0277] Comment

[0278] The mixture of the two frame formats need not be supported, i.e.,all nodes connected to a FlexRay communication system can be configuredusing only the FlexRay format (see FIG. 108) or the byteflight format(see FIG. 109).

[0279] FlexRay Frame Format

[0280] The following refers to the FlexRay frame format.

[0281] Req: It must be possible to use the FlexRay format in a purestatic, in a combined static and dynamic, and in a pure dynamicconfiguration.

[0282] Req: The first section of the data field in a frame according tothe FlexRay format must be configurable as a message ID field. This datafield must be filterable by the receiver.

[0283] In FIG. 108 the following abbreviations are used:

[0284] Res: Reserved bits, 4 bit, for future protocol extensions.

[0285] ID: Identifier, 12 bit, value domain: (1₁₀ . . . 4095₁₀), definesthe slot position in the static segment and defines the priority in thedynamic segment. A lower identifier determines a higher priority. Theidentifier of a frame must be unique within a cluster. Each controllercan have one or more identifiers (in the static and the dynamicsegment).

[0286] SYNC: Synchronization field, 1 bit, indicates that the slot isused for clock synchronization.

[0287] DLC: Data length code field, 7 bit, DLC*2=number of data bytes(0₁₀, 2₁₀, . . . , 246₁₀).

[0288] H-CRC: 9 Bit Cyclic Redundancy Check—Sequence. The H-CRC iscalculated over the SYNC- and DLC-field.

[0289] NF: Null frame indication field, 1 bit, indicates that thecorresponding data buffer is not updated by the host before sending.

[0290] CYCO: Cycle Counter, 6 bit, the cycle counter is increasedsimultaneously in all nodes by the controller at the start of each newcommunication cycle.

[0291] Message ID: The Message ID field is configurable to be used asthe message identifier or as the first two data bytes.

[0292] D0 . . . D246: Data bytes, 0-246 bytes.

[0293] CRC: 24 Bit Cyclic Redundancy Check—Sequence. The CRC iscalculated over the complete frame.

[0294] Byteflight Frame Format

[0295] The following refers to the byteflight frame format (see FIG.109).

[0296] Req: The byteflight frame format must be supported for puredynamic configurations.

[0297] In FIG. 109 the following abbreviations are used:

[0298] ID: Identifier, 8 bit, value domain: (1₁₀ . . . 255₁₀), definesthe priority in the dynamic segment. A lower identifier determines ahigher priority. The identifier of a frame must be unique within acluster. Each controller can have one or more identifiers.

[0299] Res: Reserved bits, 4 bits, for future protocol extensions.

[0300] LEN: Length field, 4 bit, LEN=number of data bytes (0₁₀ . . .12₁₀), a value higher than 12 is handled as LEN=12.

[0301] D0 . . . D11: Data bytes, 0-12 Bytes

[0302] CRC: 15 Bit Cyclic Redundancy Check—Sequence(x¹⁵+x¹⁴+x¹⁰+x⁸+x⁷+x⁴+x³+1).

[0303] FCB: Fill completion bit: an additional bit is added to the 15bit CRC to fill the complete word. The bit is set to “0” as LSB.

[0304] Frame Scheduling—Multiplexing of Sending Slots

[0305] The following refers to frame scheduling and multiplexing ofsending slots.

[0306] Req: The cycle counter can be used to distinguish betweendifferent frame contents.

[0307] Comment

[0308] For a sending slot different send and receive buffers can bedefined in different cycles (slot multiplexing).

[0309] Comment

[0310] The cycle counter can be used as a logical extension to theidentifier (in the case of multiplexing).

[0311] Frame and Bit Coding

[0312] The following refers to frame and bit coding.

[0313] Req: The coding algorithm in the communication controller has tobe robust against:

[0314] glitches

[0315] Optical Physical Layer

[0316] The following refers to the optical physical layer.

[0317] Req: The controller must support at least the byteflight opticalbit encoding.

[0318] Comment

[0319] In byteflight, frames on the communication media are composed ofindividual bytes consisting of a start bit, eight data bits and a stopbit.

[0320] In addition, transmission of each frame begins with a startsequence consisting of 6 logical “0”-bits. This is illustrated by thediagram in FIG. 110. Due to certain effects in the optical transmission,it is possible for the start sequence to be become shorter or longerduring optical transmission. This is why the receiver accepts startsequences in the region of 1 to 9 logical “0”-bits. This is illustratedby the diagram in FIG. 111.

[0321] Electrical Physical Layer

[0322] The following refers to the electrical physical layer.

[0323] Req: Frames on the communication media for the electricalphysical layer are composed as shown in FIG. 112. The frame end sequencemay be empty.

[0324] Req: A suitable bit coding scheme has to be selected, inaccordance to bandwidth efficiency and electromagnetic compatibility(EMC) requirements.

[0325] Frame Timing

[0326] The following refers to frame timing.

[0327] Req: Frame timing of different communication controllerimplementations must be interoperable.

[0328] Frame Timing for the Static Segment

[0329] Req: Looking at the frame timing for the static segment, thereception start window shall be defined in relation to the precision.I.e., the start window must be greater than the precision.

[0330] Comment

[0331] The actual value for the reception start window must be definedin the implementation specification.

[0332] Req: In the static segment accurate timing requirements have tobe ensured for correct frame reception. Frames may only start within thereception start window.

[0333] Comment:

[0334] The length of the frame determines the frame duration. Correctreception is given if the respective frame does not violate the temporalborders given by the access scheme. The judgement of temporalcorrectness is based on a rigid timing scheme.

[0335] Req: The time difference between the predicted start StartNom andthe observed start of the frame (SOF) is used by the clocksynchronization algorithm.

[0336] Req: The length of the inter frame gap (IFG) has to be minimized,in order to optimize the net communication rate.

[0337] Frame Timing for the Dynamic Segment

[0338] Req: Looking at the frame timing for the dynamic segment, theframe timing in the dynamic segment must be defined due to thebyteflight specification.

[0339] Start-up

[0340] Requirements

[0341] The following refers to the startup of the communication system.

[0342] Req: For each configuration (Pure Static, Pure Dynamic and MixedSystems) the startup of the communication network has to be possible assoon as two nodes are able to communicate.

[0343] Req: The integration of controllers that are powered on latermust not disturb the startup procedure of the other nodes.

[0344] Req: The startup and re-integration of controllers shall notdisturb the normal operation of the network.

[0345] Req: The worst-case startup time under the fault conditions givenabove has to be provided and guaranteed by the supplier of thecommunication controller. The communication network must be operationalafter 100 ms.

[0346] Comment:

[0347] The application designer has to consider the startup time duringthe determination of the configuration parameters. Typical automotiveapplications require a worst case startup time of 100 ms. For systemconfigurations with extremely long communication cycles longer startuptimes are acceptable.

[0348] Req: During startup a communication controller sets the cyclecounter according to the value in the received frame. The cycle time isderived from the frame ID and set accordingly.

[0349] Req: The startup must work without reliance on collisiondetection.

[0350] Comment:

[0351] Collisions can occur on the bus during startup and in the case offaults. In star topologies collision detection is not always feasible.

[0352] Principle of Operation—Protocol Modes

[0353] Pure Static System and Mixed System

[0354] Req: The startup has to work as a distributed algorithm.

[0355] Req: Only controllers that participate in clock synchronization(sync bit set) are allowed to start up the system.

[0356] Comment

[0357] In a dual channel system only controllers connected to bothchannels are allowed to execute the startup in a heterogeneous topology(mixing controllers with single channel and controllers with dualchannel).

[0358] Controllers connected to only one channel are not allowed tostartup the bus because they may corrupt the traffic of this channel incase of an incoming-link failure by sending frames after thelisten-timeout (listen_timeout).

[0359] Req: The startup of the communication network, the integration ofnodes powered on later and the re-integration of failed nodes must befault-tolerant against:

[0360] the temporary/permanent failure of one or more communicationcontrollers (down to one controller sending in the static segment formixed or pure static configurations),

[0361] the temporary/permanent failure of one or more communicationchannel(s) in a redundant configuration, and

[0362] the loss of one or more frames.

[0363] Pure Dynamic System

[0364] Req: A single master sends the SOC symbol. The master shall bedefined at design time.

[0365] Shutdown

[0366] The following refers to shut-down of the communication system.

[0367] Req: The co-ordinated shutdown of the FlexRay cluster, includingall nodes and all stars initiated by the application must be possible.The interference with the wake-up mechanism must be handled.

[0368] Req: The communication system has to support a synchronizedsystem shutdown without error indications.

[0369] Clock Synchronization

[0370] The following refers to clock synchronization of the nodes in thecommunication system.

[0371] Comment

[0372] The proper synchronization of the individual clocks of thecommunication controllers is a pre-requisite for the TDMA communicationscheme.

[0373] The following description refers to the FlexRay clocksynchronization mechanism (based on the Fault-Tolerant Midpointalgorithm).

[0374] Pure Dynamic System

[0375] Req: In a pure dynamic operation the clock synchronization isperformed by a master (SOC).

[0376] Pure Static and Mixed System

[0377] Req: The global time is a vector of two values. Globaltime=<cycle_counter, cycle_time>.

[0378] Req: The cycle time is a counter incremented in units ofmacroticks. The cycle time is reset to 0 at the beginning of eachcommunication cycle.

[0379] Req: The macrotick defines the resolution of the global timewithin one cluster. A resolution of 1 μs must be achievable in realisticconfigurations.

[0380] Req: The macrotick shall be independent of oscillator frequency.

[0381] Comment

[0382] In the implementation each (local) macrotick is an integermultiple of the (local) clock tick, i.e. depends on the oscillatorfrequency, but the factors of two different macroticks can be different,so over a cycle, independence can be achieved.

[0383] Req: The microtick defines the accuracy of the clock differencemeasurement. A resolution of <=50 ns is required for the microtick.

[0384] Comment

[0385] Typical automotive applications require a resolution of 50nanosecond. For system configurations with low bandwidth, higher valuesare acceptable.

[0386] Req: The clock synchronization mechanism must be able to keep allfault-free controllers within the precision. A clock synchronizationprecision within the different controllers of better than 1 microsecondis required.

[0387] Comment

[0388] Typical automotive applications require a precision of 1microsecond. For system configurations with lower precisionrequirements, greater values are acceptable.

[0389] Req: The absolute value of the global time must be the same atevery controller, within the limits defined by the precision. Duringstartup the first sending node determines the value of the global time.

[0390] Req: The fault tolerance of the clock synchronization mechanismmust be scalable with the number of controllers. The level of faulttolerance depends on the number of actual nodes in the system (3 k+1 totolerate k asymmetric faults). In a reduced fault-tolerant configurationof less than four controllers (e.g., 2 or 3, in a degraded mode ofoperation) the synchronization must be possible. For 4 to 6 controllersthe clock synchronization mechanism must be fault-tolerant against 1(asymmetric) fault. For 7 or more controllers the clock synchronizationmechanism must be fault-tolerant against 2 (asymmetric) faults.

[0391] Req: The clock synchronization mechanism must prevent theformation of cliques with different notions of time within the network.

[0392] Req: The clock synchronization mechanism must be able to operatewith oscillators that have automotive quality. In particular the clocksynchronization mechanism must be able to deal with the physicalphenomena (drift, deterioration) that can occur during an automobilelifetime.

[0393] Req: A subset of controllers must be configured to sendsync-frames (a frame with a set SYNC bit). In a dual channel system onlycontrollers connected to both channels may belong to this subset.

[0394] Req: Only one static sending slot of each controller is allowedto contribute to the clock synchronization mechanism, i.e., a controllermay send at most one sync-frame per communication cycle.

[0395] Req: Only correctly received sync-frames are used for clocksynchronization.

[0396] Req: Every node has to use all available sync-frames for clocksynchronization.

[0397] Req: The clock synchronization and the implementation of theclock synchronization shall be as resilient as possible against designviolations resulting from environment or possible misuse.

[0398] Principle of Operation

[0399] The following refers to the principle of operation.

[0400] Obtaining the time values

[0401] Req: In the static segment every node measures the timedifference between the actual receive time and the expected receive timefor the sync-frames with a resolution of a microtick.

[0402] Req: This time difference measurement is done for all channels.

[0403] Req: A start of frame (SOF)-window is placed around the expectedreceive time of an SOF. The length of the receive-window is equal to thelength of the SOF-window.

[0404] Req: Time values are obtained for correct frames only.

[0405] Comment

[0406] Note that one of the reasons why a frame is considered incorrectis reception outside the receive window. The stringent application ofthe receive-window mechanism ensures that synchronization errors ofnodes are detectable.

[0407] Measurement Method

[0408] Req: The measurement of the clock deviations is done throughmeasuring the differences between the expected arrival time and theactual arrival time. The expected arrival time of a frame is defined bythe internal view of the cycle time.

[0409] Synchronization Algorithm

[0410] The following refers to the synchronization algorithm.

[0411] Req: The synchronization algorithm uses a fault-tolerant midpointalgorithm (FTM) that operates with an arbitrary number of controllers.

[0412] Comment, Description of the FTM

[0413] The measured values are sorted and the k largest and smallestvalues are discarded. k is adapted dynamically so that at least 2measured values are remaining.

[0414] The largest and the smallest of the remaining values are selectedfor the calculation of the midpoint value, i.e., average of those twovalues. The resulting value in a node describes the deviation of the ownclock from the global time base and serves as a correction term.

[0415] Req: The resulting correction term(s) shall be used for errordetection of the communication controller. If the correction term cannotbe applied, an error has to be signaled to the host.

[0416] Req: The clock correction term(s) calculated in the previous stepshall be applied to the local clock.

[0417] Req: If equal or more than half of the frames are receivedoutside the reception start window a synchronization error is indicatedto the host. The synchronization error is a fatal error the controllerhas to reintegrate.

[0418] Comment

[0419] This mechanism prevents the formation of cliques.

[0420] External Synchronization

[0421] The following refers to the external synchronization

[0422] Req: External synchronization must be supported.

[0423] Comment

[0424] External synchronization is necessary for the synchronization ofa FlexRay network to an external time reference, e.g., a GPS receiver ora DCF77 receiver, or to synchronize several FlexRay networks.

[0425] Req: Each controller can add an additional external clockcorrection term(s) to the calculated clock correction term(s).

[0426] Req: The resulting clock correction term(s) shall not be greaterthan the maximum allowed correction term(s) or smaller than the minimumallowed term(s). The communication controller shall limit the appliedcorrection term(s) to allowed values.

[0427] Req: The host shall be able to read the current (local)correction term(s) (current clock value) and set the external correctionterm(s).

[0428] Req: A hardware input signal at the communication controller forexternal synchronization is required.

[0429] Req: The hardware input signal shall be connected to the internalsoft-reset of the controller. It shall be possible to release thecontroller from soft reset at a specific time by the host.

[0430] Support of Application Agreement Protocols

[0431] Req: The protocol has to support the realization of applicationagreement protocols. This requires multiple sending slots to achieveagreement within one communication cycle.

[0432] Support of Network Management

[0433] Req: Support of synchronous distributed application startup andshutdown with acceptable timing and fault tolerance characteristics.

[0434] Req: Support of node and network modes with high security againstcritical inadvertant mode changes.

[0435] Hardware Specification

[0436] The following part of the description explains thehardware-related requirements for a FlexRay system.

[0437] General Requirements

[0438] Regarding the communication hardware, a distributed system ofFlexRay nodes must offer some properties when being designed by usingactive stars and passive busses:

[0439] Req: One and two channel solutions have to be supported.

[0440] Req: An electrical and optical physical layer must be supported.

[0441] Req: Communication via redundant physical links is optional. Thecommunication system must support both communication via redundant andnon-redundant physical links. A mix of redundant and non-redundantphysical links must be supported.

[0442] Req: When using active stars several 1:1 links must be used.

[0443] Req: Wake-up of nodes and stars via the communication system mustbe supported. Signaling on one channel is sufficient for wake-up.

[0444] Req: A baud-rate from 500 kbit/s up to 10 Mbit/s must besupported.

[0445] Req: A power mode management must be supported.

[0446] Topology

[0447] Req: The protocol has to be independent from the topology as faras possible. Mixed and homogeneous system topologies must be supported.

[0448] Req: A FlexRay network using a passive bus must be possible (seeFIG. 114).

[0449] Req: A FlexRay network using a passive star must be possible.

[0450] Req: A FlexRay network using a active star must be possible (seeFIG. 113).

[0451] Req: Support for different topologies/physical layers ondifferent channels is desirable.

[0452] Req: Support for different physical layers on one channel isdesirable.

[0453] Req: A distributed system of FlexRay nodes can be designed bycombining the active star and the passive bus approach (see FIG. 115).Several nodes may be connected to a branch.

[0454] Each node must adhere to the following requirements (see FIG.103):

[0455] Req: Within a node 1 or 2 bus drivers must be connected to asingle communication controller.

[0456] Each active star must adhere to the following requirements (seeFIG. 116):

[0457] Req: No communication controller is required to perform the starfunctionality.

[0458] Req: No host is required to perform the star functionality.

[0459] Comment

[0460] An implementation may integrate the star within an ECU.

[0461] Req: A branch of an active star has to be de-activated if afaulty communication signal is detected:

[0462] 1) permanent “0” on the bus or

[0463] 2) permanent “1” on the bus or

[0464] 3) permanent noise on the bus.

[0465] Req: A de-activated branch may not influence the communication ofthe active modules (fail silent).

[0466] Req: A de-activated branch has to be re-activated if the failurecondition which leads to a faulty communication signal is no longeravailable.

[0467] Automotive Constraints

[0468] The communication system according to the present invention canbe used in almost any environment. However, preferably it is used invehicles of any kind, in particular in safety critical applications inthe automotive sector. In that case the communication system has tofulfill the following automotive constraints:

[0469] Req: FlexRay devices must meet automotive temperaturerequirements.

[0470] Comment

[0471] General temperature requirements include a range of −40 to +125degrees Celsius. Special applications may require higher temperatures,e.g., near braking actuators.

[0472] Req: Each product has to be optimized to meet the automotive andlegal EMC requirements. External filters may not be required but maywell be used.

[0473] Comment

[0474] Listed severity levels as named won't be achievable when using apassive bus.

[0475] Req: The power consumption during the normal operating mode andthe low power mode has to be minimized.

[0476] Comment

[0477] Typical values are given in the following table 1: TABLE 1Typical current consumption. Function Min. Typ. Max. Unit RemarksQuiescent current (from the 10 μA The bus driver permanent power) of themonitors wake- bus driver up events, the voltage regulator is switchedoff Current for the bus driver 10 mA bus free - no and the communicationactual controller communication Current for the bus driver 50 mA busbusy - and the communication communication controller active

[0478] Req: The voltage supply for the communication controller shouldbe the same as for commercially available ECUs.

[0479] Comment

[0480] Today most ECUs support 5 V. For optimizations e.g., 3 V areallowed.

[0481] Req: All inputs and outputs of the bus driver and thecommunication controller which are directly coupled to the wire harnesshave to fit the known electric requirements. Support of future highsupply voltages (36/42 V instead of 12 V) must be supported.

[0482] Architecture—Power Modes

[0483] This part of the description summarizes the requirements on thecommunication controller and the bus driver to run an ECU in severalmodes.

[0484] Req: The power modes of the ECU must be sensitive to controlsignals from the host and wake-up signals from the transmission media,from the ECU internally (e.g., from the host) and optionally from theECU externally (e.g., by a switch).

[0485] Req: At least 3 power modes must be distinguished forcommunication controllers and bus drivers and stars (see Table 2):

[0486] Normal (voltage regulator(s) active, communication possible)

[0487] Standby (voltage regulator(s) active, communication not possible)

[0488] Sleep (voltage regulator(s) not active, communication notpossible) TABLE 2 Power modes Power Mode of the Node Communication PowerSupply Normal available available Standby not available available Sleepnot available not available

[0489] Req: The power modes of the active star must be controlled by thebus drivers automatically. It is not desireable that a dedicated‘wake-up’ and ‘shut-down’ command is send to the star or additionalwiring is required.

[0490] Communication Controller

[0491] The following refers to the Communication Controller:

[0492] Req: A communication controller must include an interface toconnect a host.

[0493] Req: Parts of the behavior visible to the host, e.g., applicationcontrol, configuration, message area, communication controller status,interrupts, etc. have to be confirmed among the suppliers and specified.

[0494] Req: The time base of the redundant channels must be the samewithin each node (e.g., by a single state machine).

[0495] Req: The functionality of the communication controller must beindependent of the existence of a bus guardian.

[0496] Req: For a stand-alone controller the pin-out must be completelyspecified and documented.

[0497] States and Operating Modes

[0498] Req: Power-on and NOT (power-on) must be distinguished at least.

[0499] Req: The controller has to be passive outside the mode power-on.

[0500] Req: The controller has to be resetable externally.

[0501] Req: The controller has to support at least one low-power mode.

[0502] Req: The controller modes have to be defined in accordance withthe bus driver modes.

[0503] Logical Line Operation on the Communication Media (e.g. bus)

[0504] Req: At least the following information has to be distinguished:

[0505] bus busy: data or SOC symbol are transmitted.

[0506] bus idle.

[0507] Req: The encoding/decoding method has to allow both optical andelectrical communication networks. At least one method has to besupported:

[0508] Non Return to Zero (NRZ) in the physical layer coding scheme (seebyteflight specification).

[0509] Req: Bit sampling must be robust against disturbances typicallyinside vehicles e.g., signal delay, edge jitter, baud-rate jitter.

[0510] Req: Bit sampling must be able to deal with e.g., temperaturevariations or tolerances of electrical and physical parameters.

[0511] Optical Driver

[0512] Req: See the byteflight specification.

[0513] Electrical Bus Driver

[0514] Req: For a bus driver the pin-out must be completely specifiedand documented.

[0515] Req: For redundant configurations an implementation has to bechosen which minimizes the probability of common mode failures of bothbus drivers (→ each redundant communication is disturbed).

[0516] Comment:

[0517] Two bus drivers to support redundant communication by a singlecommunication controller may possibly not be implemented on a singledie.

[0518] Two bus drivers to support redundant communication by a singlecommunication controller can be integrated in one package, if any commonmode failure can be excluded.

[0519] Req: The bus driver must provide status information anddiagnostics information which can be read by any p-controlleroptionally.

[0520] Req: The bus driver must be protected against electricalover-voltage and short-circuits.

[0521] Voltage Monitoring

[0522] Req: The bus driver must monitor the battery voltage and has toprovide status information.

[0523] Req: The bus driver must detect an interrupted connection to thebattery and has to provide status information.

[0524] States and Operating Modes

[0525] The bus driver has to support several states or operating modes:

[0526] Req: Power-on and NOT (power-on) must be distinguished

[0527] permanent power

[0528] regulator voltage

[0529] Req: The bus driver has to support at least two low-power modes.

[0530] Req: The bus driver has to be able to signal an internal powerdown mode to an external voltage regulator.

[0531] Req: the bus driver has to support a “shutdown mode”

[0532] this mode has to be reached by secured mechanisms on demand ofthe host

[0533] this mode must be left only by a power down

[0534] the bus driver has to be passive and has to signal to the voltageregulator to switch off.

[0535] Req: The bus-levels have to be chosen by the bus driverautomatically to support any net-wide power down modes.

[0536] Bus Guardian

[0537] Req: The failure of a communication controller in the timedomain, e.g., a communication controller sends in a time slot when it isnot allowed to send, must be prevented by a bus guardian. Theprobability for common mode failures in the time domain affecting both,the communication controller and the bus guardian must be sufficientlylow.

[0538] Req: The bus guardian must protect the static slots (controller)from each other. In the dynamic segment the bus guardian grants allcontrollers access to the bus.

[0539] Comment:

[0540] One of the main reasons for an error in the time domain is anerroneous internal state that leads to an incorrect (timing) access tothe communication media.

[0541] Req: The bus guardian must be able to detect errors in thephysical clock source as well as errors in the internal representationof the time base of the communication controller.

[0542] Comment:

[0543] One of the main reasons for an error in the time domain is anerror in the clock source of the communication controller. Hence, theclock source check mechanism of the bus guardian must concentrate on themain physically possible failure modes of the clock source of thecommunication controller.

[0544] The bus guardian may have a clock source of its own. Two busguardians, which are connected to the same communication controller canuse the same clock source.

[0545] Req: The bus guardian must not disable access to more than onechannel, i.e., one bus guardian per channel is required.

[0546] Req: It must be possible to implement the bus guardian as astand-alone circuit. This circuit has to be combinable with the knownstate of the art physical layers.

[0547] Comment

[0548] The bus guardian could be integrated in the bus driver. Theinterface(s) towards the communication controller (and the bus driver)must be defined.

[0549] Req: It must be possible to implement the bus guardian as astand-alone circuit in the star coupler. This circuit has to interactwith the known state of the art physical layer.

[0550] Req: The bus guardian has to check the correct enabling of thedriver output stage.

[0551] Req: The mechanism of separating the communication controllerfrom the communication media must be checked. At least once per drivingcycle (power on/power off) is sufficient.

[0552] Req: The bus guardian is configured via a configuration datainterface.

[0553] Req: The bus guardian has to enable and disable the bus driveroutput stage according to a predefined timing pattern. If the busguardian detects an error in the timing pattern of the communicationcontroller it permanently disables access to the communication media andsignals this.

[0554] Req: If an error in the bus guardian occurs the communicationchannel must not be disturbed (monopolized).

[0555] Req: The configuration data interface must be specified anddocumented. This mainly includes the logical contents of the timingpattern.

[0556] Wake-up

[0557] Req: Several wake-up mechanisms have to be taken intoconsideration.

[0558] ECU→Bus Driver

[0559] Req: The bus driver has to be woken up by any source inside oroutside the ECU (local wake-up).

[0560] Req: The wake has to be two edge sensitive.

[0561] Example

[0562] e.g., edge at a Wakeup pin of the Bus Driver

[0563] Bus→Bus Driver

[0564] Req: From the host's point of view a general wake-up mechanism isrequired for both electrical and optical systems.

[0565] Req: The bus driver should be woken up via standard communication(message-pattern).

[0566] Req: The wake-up detector has to be robust against disturbancesin vehicles like common mode signals by emission.

[0567] Req: The bus driver may not be woken up by any noise.

[0568] Bus Driver→Controller

[0569] Req: The bus driver has to wake up the controller by any signalon the interface. A dedicated wake-up line is not required.

[0570] Example:

[0571] e.g., edge at the receive (Rx) pin produced by the bus driver

[0572] Bus Driver→Power Supply

[0573] Req: The bus driver has to signal its sleep state, e.g., tocontrol the voltage regulator.

[0574] Example:

[0575] inhibit signal

[0576] Controller→Bus Driver

[0577] Req: The controller must be able to wake-up the bus driver by anysignal on the interface. A dedicated wake-up line is not required.

[0578] Example:

[0579] Edge at the Send (Tx) pin

[0580] Selective Sleep

[0581] Req: The realization of selective sleep has to be supported.

[0582] Interfaces

[0583] The following refers to the interfaces provided within a node ofthe communication system: The interfaces between the single modules(host, controller, bus driver, bus guardian, and power supply) have tobe agreed upon among the suppliers according to the general requirementsdefined in this document. FIG. 117 shows an overview of all interfaces.

[0584] Communication Controller

Host Interface (CHI)

[0585] General Requirements

[0586] Req: The configuration data of the communication controllers mustbe securable (e.g., by soft reset) against accidental access andmodifications.

[0587] Req: Protect against improper host modification of BG and CCconfiguration data.

[0588] Req: The interface between the host and the communicationcontroller should be implemented as a 16 bit interface (selectablemultiplexed/non-multiplexed bus interface).

[0589] Req: Functional compatibility between different suppliers has tobe guaranteed at CHI level.

[0590] Req: The CHI has to be configurable into transmit and dedicatedreceive buffers and receive buffers with first in first out (FIFO)behavior.

[0591] Req: If the FIFO queue is full and new data arrives the oldestdata is overwritten. The FIFO queue must set a diagnosis bit when datain the buffer is overwritten.

[0592] Req: Most significant bit/byte (MSB) first is used for frametransmission.

[0593] Comment:

[0594] The status area of the CHI contains communication controllerstatus fields, which are written by the controller and which areread-only for the host. The status fields will be defined in theprotocol specification and interface specification.

[0595] The control area in the CHI contains fields that allow the hostto control the behavior of the communication controller. The controlfields will be defined in the protocol specification and interfacespecification.

[0596] The message area in the CHI contains a memory area where theframes to be sent/received are stored together with status informationfor each frame. The layout of this memory area is determined in theconfiguration data of each communication controller. The message bufferstatus fields will be defined in the protocol specification andinterface specification.

[0597] Req: Support of traceability of system- and component-levelfaults to identify root causes of failures.

[0598] Req: The hardware implementation should verify that only onecombination of frame ID and sync bit is considered valid fortransmission.

[0599] Frame Filtering and Masking

[0600] Req: Message Reception, every message buffer has to contain achannel, frame ID and cycle counter which are used for messagefiltering. Optionally the first two data bytes of each message bufferare used as message ID filter.

[0601] Options for filtering:

[0602] 1) Frame ID+channel

[0603] 2) Frame ID+cycle counter+channel

[0604] 3) Message ID+cycle counter+channel

[0605] Comment

[0606] Filtering: Filtering of messages means that for each messagebuffer the message's frame ID, cycle count and message ID are parametersthat define in which message buffer the correctly (correct CRC, time,etc.) received message is stored or if the message is discarded.

[0607] Req: There must be at least one mask register per communicationcontroller and channel that allows all combinations of masking.

[0608] Comment:

[0609] Masking: Masking of message filters means that some (parts) ofthe filtering parameters may be configured to be disregarded (set to“don't care”).

[0610] Req: Message transmission, filtering parameters for transmissionare frame ID and cycle counter; there is no masking possible for theframe ID. Each transmit buffer has its own mask for the cycle counter.

[0611] Interrupts

[0612] Req: The host computer has to be able to request differentinterrupts from the communication controller: at least read interrupt(buffer), write interrupt (buffer), 2 independent timer interrupts.

[0613] Req: Timer interrupt: the host can request a time interrupt atany absolute point in the global time (across communication cycleborders).

[0614] Req: One interrupt line is required for a standalone controllerimplementation.

[0615] Req: Interrupts can be mapped to one or more interrupt lines inan integrated controller.

[0616] Host

Bus Guardian Interface

[0617] Req: The bus guardian configuration data is written duringdownload and then stored in a local memory of the bus guardian.

[0618] Req: During normal operation no configuration data transfer fromthe host to the bus guardian is allowed.

[0619] Req: The bus guardian periodically updates a status field whichcan be accessed by the host/bus guardian interface containing at leastthe following status information:

[0620] State of the bus

[0621] State of the controller

[0622] Communication Controller

Bus Guardian Interface

[0623] Req: At least the following control information is required:

[0624] ARM signal

[0625] Communication Controller

Bus Driver Interface

[0626] Req: This interface has to be confirmed among the suppliers.

[0627] Example:

[0628] Tx, TxEnable (TxEN)

[0629] Rx, RxEnable (RxEN)

[0630] Bus Guardian

Bus Driver Interface

[0631] Bus Driver

Power Supply Interface

[0632] Req: To perform the wake-up and sleep functionality an interfacebetween bus driver and power supply is required.

[0633] Error Handling

[0634] The following refers to the error handling.

[0635] The communication system and its components shall offer adequateerror management mechanisms to deal with faults arising from thefollowing levels:

[0636] media

[0637] bit (coding)

[0638] frame

[0639] data

[0640] topology and

[0641] time.

[0642] The communication system furthermore shall offer diagnosisinformation to the host computer with respect to controller, bus(channel), and incoming/outgoing link failures.

[0643] Requirements

[0644] Req: The error management shall follow the “never-give-up”philosophy.

[0645] Comment:

[0646] This means that the communication protocol has to support properoperation until a certain critical error states is reached.

[0647] Req: The non-arrival of periodic messages shall not beunrecognized.

[0648] Comment

[0649] It is okay, if, e.g. one, periodic message is missed, but thishas to be detected. The fact, that a periodic message was missed shouldbe signaled to the host.

[0650] Req: If a periodic message was missed, no random data shall begiven to the host.

[0651] Req: Data content of messages, (periodic and spontaneous) mustnot be changed by the communication protocol.

[0652] Req: The change of data content shall be signaled to the host.

[0653] Req: After an error was detected at a communication partner inthe network, the functionality of the other communication partners shallnot be influenced.

[0654] Comment:

[0655] The correct function may not depend from the correct function ofa certain host, of a certain communication controller or of a certainpower supply.

[0656] The communication controller shall detect the following list oferrors:

[0657] Req: Synchronization error. The communication controller is notany more synchronized to the global time on the bus.

[0658] Req: The communication network must offer diagnosis informationto the host computer with respect to the bus (channel),incoming/outgoing link failures.

[0659] Req: The communication network must offer diagnosis informationto the host computer within a defined maximum delay after the occurrenceof the failure of the diagnosis element.

[0660] Req: The communication network is not required to provideconsistent and agreed diagnosis information to the host computer.

[0661] Hardware Units

[0662] The following faults have at least to be detected by thecommunication controller:

[0663] Req: Defect time source (e.g., broken crystal).

[0664] Req: Low voltage.

[0665] The following faults has to be recognized by the bus driver aserrors:

[0666] Req: Faulty communication signals caused by e.g. any faultytransmission media (e.g., a broken line, short circuit to ground, . . .).

[0667] Req: Incorrect communication with the host e.g., communicationvia the data interface.

[0668] Req: Incorrect communication with the communication controllere.g., bus-blocking transmit signals.

[0669] Req: De-activated branch.

[0670] Interfaces

[0671] Req: Status information on detected errors must be provided.Additionally it is required that maskable interrupts for certaindetected errors can be requested by the host.

[0672] Constant Definitions

[0673] In the following part of the description the constants for anumber of design parameters defined throughout the document are set toactual values. The values mentioned are examples and can be replaced byalmost any desired value.

[0674] Table 3 shows Communication Network Constants (Min/Max). TABLE 3Definition of the constants used throughout the specification. NameValue Description CONTROLLER_MAX 64 Maximum number of controllersconnected to one communication channel. CYCLE_LENGTH_MIN 250 μs Minimumlength of the configurable communication cycle. CYCLE_LENGTH_MAX 64 msMaximum length of the configurable communication cycle. DATA_BYTES_MAX246 Maximum number of data bytes. DYNAMIC_IDS 4095 Maximum number ofdynamic identifiers. STATIC_SLOTS_MIN 2 Minimum number of static slotsin a static segment of a communication cycle STATIC_SLOTS_MAX 4095Maximum number of static slots in a static segment of a communicationcycle

[0675] Glossary

[0676] In the following glossary some of the terms used for descriptionof the present invention are defined.

[0677] Bus . . . Consists of one or several channels.

[0678] Bus Driver . . . A bus driver connects a communication controllerto one channel.

[0679] Bus Guardian . . . A bus guardian protects one channel fromtiming failures of the communication controller. It is thereforeconnected to one communication controller and one bus driver. The busguardian must be independent from the protocol communication controller.

[0680] byteflight . . . Communication network developed by BMW AG,Motorola, ELMOS, Infineon, Siemens EC, Steinbeis Transferzentrum fürProzessautomatisierung, IXXAT (see www.byteflight.com)

[0681] Channel . . . A channel is a physical connection between severalcommunication controllers. A redundant channel consists of two channelsconnecting the same communication controllers.

[0682] CHI . . . Controller Host Interface.

[0683] Clique . . . Set of communication controllers having the sameview of certain system properties, e.g., the global time value, or theactivity state of communication controllers.

[0684] Cluster . . . Synonym for network within this specification.

[0685] Cluster time . . . Same as cycle time.

[0686] Communication Controller . . . A communication controller isconnected to one or two channels where it can send and receive frames.

[0687] Communication Cycle . . . Periodic data transfer mechanism.Structure and timing are statically defined. However, a static and adynamic segment allows for the transmission of both, state and eventinformation.

[0688] Controller . . . see, Communication Controller.

[0689] CRC . . . Cyclic Redundancy Code attached to a frame.

[0690] CYCLE . . . The CYCLE field is used to transmit the cyclecounter. The cycle counter is increased simultaneously in all nodes bythe communication controller at the start of each new communicationcycle.

[0691] Cycle Counter . . . Contains the number of the currentcommunication cycle.

[0692] Cycle time . . . Contains the time within a communication cyclein units of macroticks. Same as cluster time.

[0693] DATA . . . Data field in a frame.

[0694] DLC: . . . Data length field

[0695] Dynamic Segment . . . Segment of the communication cycle whereframes are transmitted according to a mini-slotting algorithm. Thesending order is defined by a statically determined identifier.Identifiers with smaller numbers have priority over identifiers withhigher numbers. A communication cycle may consist of the static segmentonly.

[0696] EOF . . . End Of Frame. An optical or electrical physical layermay require different end of frame sequences.

[0697] ECU . . . Electronic Control Unit. Same as node.

[0698] EMC . . . Electro Magnetic Compatibility.

[0699] FIFO . . . First In First Out. Buffers can be configured to workas a FIFO memory for frames.

[0700] Frame . . . A frame consists of all information transmitted inone slot (with one identifier) on one channel.

[0701] FTA . . . Fault Tolerant Average. The FTA is a fault tolerantclock synchronization algorithm that is able to tolerate up to apre-defined number k of maliciously faulty clocks. This algorithm isbased on a sorted array of clock deviations. The lower and upper k clockdeviation values are discarded. From the remaining clock deviationvalues the average value is calculated and then used for the clockcorrection.

[0702] FTM . . . Fault Tolerant Midpoint. The FTM is a fault tolerantclock synchronization algorithm that is able to tolerate up to apre-defined number k of maliciously faulty clocks. This algorithm isbased on a sorted array of clock deviations. The lower and upper k clockdeviation values are discarded. From the remaining clock deviationvalues the median value is chosen for the clock correction.

[0703] Gateway . . . A node may function as a gateway and connect two ormore networks.

[0704] Global time . . . Contains the combination of cycle counter andcluster time.

[0705] Hamming Distance . . . Minimum distance of any two code wordswithin a code.

[0706] Host . . . The host is the part of an ECU where the applicationsoftware is executed, separated by the CHI from the communicationnetwork.

[0707] ID . . . The frame identifier defines the slot position in thestatic segment and defines the priority in the dynamic segment. A loweridentifier determines a higher priority. Identifier 0 is reserved forthe SOC symbol. The identifier of a frame must be unique within acluster. Each controller can have one or more identifiers (in the staticand the dynamic segment).

[0708] Identifier . . . see, ID.

[0709] IFG . . . Inter Frame Gap.

[0710] LEN . . . Length field of a frame.

[0711] LLI . . . Logical Line Interface.

[0712] LSB . . . Least Significant Bit/Byte.

[0713] MAC . . . Media Access Control.

[0714] Macrotick . . . Basic unit of time measurement within a networkof communication controllers. The clock synchronization mechanismguarantees that the clock values at all non-faulty controllers areequal. The uncertainty in the clock values is bounded by the precision.

[0715] Message . . . Application data transported within a frame.Several messages may be packed together to constitute a frame.

[0716] Microtick . . . Basic unit of time measurement within acommunication controller for measuring the time difference between thecontrollers clock and the clocks of the other communication controllers.Clock correction is done in units of Microtick.

[0717] MSB . . . Most Significant Bit/Byte.

[0718] Network . . . A network consists of a set of nodes (more than onenode) connected by communication subsystem. Networks are connected byspecial nodes (gateways). Same as Cluster.

[0719] Node . . . A node may contain one or more communicationcontrollers. Equivalent to ECU (Electronic Control Unit).

[0720] Nominal Precision . . . The nominal precision is the clocksynchronization precision that can be reached by the local clocksynchronization of a cluster.

[0721] NRZ . . . Non Return to Zero physical layer coding scheme.

[0722] Precision . . . The precision is a time interval bounding thedeviations between the local clocks of all active communicationcontrollers. If a communication controllers clock deviates more than theprecision from the clocks of the other controllers it must notparticipate in the communication any longer.

[0723] Slot . . . Duration of time during which one communicationcontroller may access the communication medium.

[0724] SOC . . . Start of Cycle. Defines the start of a communicationcycle in the pure dynamic mode, and the start of communication forstartup.

[0725] SOF . . . Start of Frame. An optical or electrical physical layermay require different start of frame sequences.

[0726] Star Coupler . . . A star coupler is connected to one channel.

[0727] Static Segment . . . Segment of the communication cycle whereframes are transmitted according to a statically defined TDMA scheme. Acommunication cycle may consist of the static segment only.

[0728] SYNC . . . Synchronization field. This field indicates that theslot is used for clock synchronization.

[0729] TDMA . . . Time Division Multiple Access.

[0730] The following is a description of the notation used forvariables, constants and parameters in this document. TABLE 4 NamingConventions Naming Information Convention Type Description cNameProtocol Values used to define characteristics or limits of the Constantprotocol. These values are fixed for the protocol and can not bechanged. vName Node Variable Values which will be changed depending ontime, events, etc. gName Cluster Parameter which must have the samevalue in all nodes Constant in a cluster, is initialized during softreset, and can only be changed during soft reset pName Node ConstantParameter which may differ in nodes of a cluster, is initialized duringsoft reset, and can only be changed during soft reset fName FrameVariable Parameters which are transmitted as part of a FlexRay orbyteflight frame. These variables are set by the transmitting node andread by the receiving nodes. xdName Time Duration Value (variable,parameter, etc.) describing a time duration, the time between two timepoints xtName Time Value (variable, constant, etc.) describing aninstant xsName Set Set of values (variables, parameters, etc.)xyName[ch] Channel Set of variables/parameters that are channelspecific. Specific Info xyName[ch] represents the pair of variables,xyName[A] represents the variable associated with channel A, xyName[B]represents variable associated with channel B. S_Name Event Internalevent signal sent between various portions of the protocol description.These do not necessarily represent actual parameters, but ratherrepresent an abstract method by which various protocol descriptions caninteract. x Stands for one of c, v, g, or p above y Optionally standsfor one of d, t, or s above.

[0731] Pseudocode Conventions

[0732] To specify functions and algorithms short code pieces are used.The pseudocode is loosely based on the programming language used byMATLAB. The following table outlines some of the pseudocode conventions(functions and elements). TABLE 5 Pseudocode Conventions Function orElement Description x = LENGTH(list) Returns the number of elements inthe list “list” list = [] Sets the list “list” to an empty list (i.e., alist with no elements) list = [list, x] Appends element “x’” to the endof the list “list” x = list(i) “x” is the i-th element of the list“list”. list(1) is the first element of the list “list” x = SORT(list)“x”is a sorted list containing the elements from the n-element list“list” placed in decreasing order such that x(1) ≧ x(2) ≧ x(3) ≧ . . . .≧ x(n − 1) ≧ x(n) x = MIN(a,b) Minimum function. If both a and b arevalid it returns a if a < b, otherwise returns b; if a invalid returnsb, if b invalid returns a, if a and b invalid returns an empty set x =Midterm(list) “x” is the result of the Fault Tolerant Midpoint Algorithmexecuted on the list “list”. for the definition of the Fault-tolerantMidpoint Algorithm x = Int[a] Returns the integer part of the (real)number “a” x = |a| Returns the absolute value of “a” (a if a ≧ 0, −a ifa < 0) x = MODULO(a,b) The modulo or remainder function. “x” is theremainder when integer “a” is divided by integer “b”. For example,MODULO(6,2) = 0 and MODULO(7,2) = 1. // Pseudocode comment. Characterson the line after the “//” are considered comments (i.e., not part ofthe pseudocode).

[0733] Bus Topology

[0734]FIG. 1 shows a possible topology configuration of a communicationsystem 106 as a dual bus. A node 100 can either be connected to bothchannels A and B (nodes A, C, and E), only to channel A (node D) or onlyto channel B (node B).

[0735] A FlexRay communication system 106 can also be a single bus. Inthis case, all nodes 100 are connected to this bus.

[0736] Star Topology

[0737] Valid Star Network Configurations

[0738] A FlexRay communication system can be built as a multiple startopology. Similar to the bus topology, the multiple-star topology cansupport redundant communication channels. Each network channel must befree of closed rings, and the number of star couplers must be between 1and cStarCouplersMax, inclusive, if there are sequentially connected(cascaded) star couplers. The total number of star couplers may be morethan cStarCouplersMax if there are branches in the network. Each networkline connecting a node to the star coupler or between two star couplersrepresents a properly terminated point-to-point connection. The incomingsignal received by the star coupler is actively driven to allcommunication nodes.

[0739] The configuration of a single redundant star network is shown inFIG. 2. The logical structure (i.e., the node connectivity) of thistopology is identical with that shown in FIG. 1. It is also possible tocreate a single, non-redundant star topology which has the same logicalstructure as the single bus mentioned above.

[0740]FIG. 3 shows a single channel network built with three starcouplers. Each node has a point-to-point-connection to one of the threestar couplers. Two of the star couplers (No. 1 and 3) are directlyconnected to the third star coupler (No. 2).

[0741] Note that it is also possible to have a redundant channelconfiguration with cascaded stars. An example of such a configuration isFIG. 4. Note that this example does not simply replicate the set ofstars for the second channel—Star 1A connects nodes A, B, and C, whileStar 2A connects nodes A, C, and E.

[0742] Star Coupler Behavior and Protocol Impact

[0743] For each node connected to a star coupler, the star couplercontains a bi-directional connection operating in half-duplex mode.

[0744] Before transmitting a frame, all connections in each star couplermust be dynamically set up to either receive or transmit

[0745] The FlexRay coding mechanism defines a Transmission StartSequence (TSS), which is used to initiate a proper connection setupthroughout the network before the actual FlexRay frame or symbol istransmitted. The transmission of the TSS is detected by the star couplerand is treated as a connection setup request. The star coupler returnsto its idle state after the bus has been released to the idle state bythe transmitting node.

[0746] At the end of each frame transmission, all star couplers mustreturn to the initial state before the next connection setup request isinitiated. This is necessary in order for the star coupler to be able toprocess the next configuration request correctly.

[0747] The minimum idle time between two consecutively transmittedframes must accommodate the times for connection setup and return to theinitial state for the star couplers that are used in the system.

[0748] Hybrid Topologies

[0749] In addition to topologies that are composed either entirely of abus topology or entirely of a star topology, it is possible to havehybrid topologies that are a mixture of bus and star configurations. TheFlexRay system supports such hybrid topologies as long as the limitsapplicable to each individual topology are not exceeded. For example,the limit of cStarCouplersMax cascaded star couplers also limits thenumber of cascaded star couplers in a hybrid topology.

[0750] There are a large number of possible hybrid topologies, but onlytwo representative topologies are shown here. FIG. 5 shows an example ofone type of hybrid topology. In this example, some nodes (nodes A, B, C,and D) are connected using point-to-point connections to a star coupler.Other nodes (nodes E, F, and G) are connected to each other using a bustopology. This bus is also connected to a star coupler, allowing nodesE, F, and G to communicate with the other nodes.

[0751] A fundamentally different type of hybrid topology is shown inFIG. 6. In this case, different topologies are used on differentchannels. Here, channel A is implemented as a bus topology connection,while channel B is implemented as a star topology connection.

[0752] Communication Cycle

[0753] The communication cycle is the fundamental element of the mediaaccess scheme within FlexRay. It is defined by means of a timinghierarchy.

[0754] Timing Hierarchy

[0755] The timing hierarchy consists of four timing hierarchy levels asshown in FIG. 7.

[0756] The highest level, the communication cycle level, defines thecommunication cycle. It contains the static segment, the dynamicsegment, the symbol window and the network idle time (NIT). Within thestatic segment a static time division multiple access scheme is used toarbitrate transmissions. Within the dynamic segment a dynamicmini-slotting based scheme is used to arbitrate transmissions. Thesymbol window is a communication period in which one symbol out of adefined set of symbols can be transmitted on the network. The staticsegment, the dynamic segment and the symbol window form the networkcommunication time (NCT), a period during which network widecommunication takes place. The network idle time defines acommunication-free period that concludes each communication cycle.

[0757] The next lower level, the arbitration grid level, contains thearbitration grid that forms the backbone of FlexRay media arbitration.In the static segment the arbitration grid consists of consecutive timeintervals, called static slots, in the dynamic segment the arbitrationgrid consists of consecutive time intervals, called minislots.

[0758] The arbitration grid level builds on the macrotick level that isdefined by the macrotick. The macrotick is specified further on.Specific macrotick boundaries are called action points. These arededicated instants at which transmissions shall start (in the staticsegment, dynamic segment and symbol window) and shall end (only in thedynamic segment).

[0759] The lowest level in the hierarchy is defined by the microtickthat is covered further on.

[0760] Communication Cycle Execution

[0761] The following specifies the communication cycle for thetime-triggered distributed (TT-D) mode and for the time-triggeredmaster-controlled (TT-M) mode. The communication cycle for theevent-triggered (ET) mode is specified futher on. The communicationcycle for the byteflight mode is covered in the byteflightspecification.

[0762] In both the TT-D mode and the TT-M mode the synchronized timetriggers the execution of the communication cycle based on aperiodically recurring principle with a period that consists of aconstant number of macroticks.

[0763] The communication cycles are numbered from 1 to cCycleMax. Eachnode shall maintain a cycle counter vCycle that shall hold the number ofthe current communication cycle. Initialization of the cycle counter isspecified further on.

[0764]FIG. 8 illustrates the execution of the communication cycle.

[0765] In the TT-D mode the static segment must contain at least twostatic slots (at least two frames must be sent with the sync bit set).The dynamic segment may exist optionally as well as the symbol window.Media access test, however, can only be performed if the symbol windowexists.

[0766] In the TT-M mode the static segment must contain exactly onestatic slot (In this slot a frame must be sent with the sync bit set).In this mode the dynamic segment must exist, while existence of thesymbol window remains optional.

[0767] Table 6 summarizes the protocol modes and the possibleconfigurations of the communication cycle. TABLE 6 Network CommunicationTime Constituents vs. Protocol Modes network communication time protocolstatic dynamic symbol media access mode segment segment window testusable TT-D mode at least 2 static — — no slots configured configuredyes at least 2 static minislots — no slots configured configuredconfigured yes TT-M mode 1 static slot minislots — no configuredconfigured configured no ET mode see Chapter “Event Triggered Mode” BFmode see byteflight specification WU mode no communication cycleestablished

[0768] As described above, the FlexRay protocol supports clusters with asingle communication channel (channel A only) or with dual communicationchannels (channel A and channel B). In the case of a dual channelcluster the channels are synchronized to one another. In the dualchannel case nodes may be connected to either one or both of thecommunication channels. These topology options may be combined freelywith the communication cycle.

[0769] Network Communication Time

[0770] Arbitration within the network communication time is performed bymeans of unique frame priorities and a slot counting scheme.

[0771] Arbitration assumes that unique frame priorities, referred to asframe identifiers, have been assigned to the frames among the nodes foreach channel (The frame identifiers may either be assigned by anoff-line configuration tool or during run-time using an applicationbased assignment strategy. Note that in all cases the uniqueness of theframe identifiers per channel must be maintained to ensurecollision-free arbitration). The frame identifiers shall range from 1 tocSlotIDMax. The frame identifier determines in which segment and whenwithin the respective segment a frame shall be sent.

[0772] Each node shall maintain a slot counter vSlotCounter[ch] for eachof the two respective channels. In the operation phase the slot countersshall be initialized with 1 at the start of each communication cycle.Initialization in the startup phase is specified further on.

[0773] Static Segment

[0774] Within the static segment a static time division multiple accessscheme shall be applied to arbitrate transmissions. In this segment allcommunication slots are of equal, statically configured duration and allframes are of equal, statically configured length.

[0775] Structure

[0776] The static segment shall consist of gNumberOfStaticSlots staticslots of equal duration. The number of static slots gNumberOfStaticSlotsis a global constant for a given cluster and may range between 1 andcSlotIDMax.

[0777] In any given node one static slot pSyncSlot may be configured tocontain a synchronization frame, a special type of frame required forsynchronization within the cluster. psyncSlot is a node specific valuethat equals the number of the static slot in which the sync frame shallbe transmitted

[0778]FIG. 9 illustrates all transmission patterns that are possible fora single node within the static segment.

[0779] In slot 1 the node transmits a frame on channel A and a frame onchannel B. In slot 2 the node transmits a frame only on channel A (Anequivalent pattern is also possible in which a node transmits a frame onchannel B and no frame on channel A. Different nodes can share a staticslot across both channels as described above). In slot 3 no frame istransmitted on either channel.

[0780] Transmission Condition

[0781] In the static segment the condition whether a frame shall betransmitted or not differs depending on the current protocol phase.

[0782] In the startup phase a frame shall be transmitted on a channel

[0783] 1. if the slot is assigned to the node via the frame ID andchannel specific assignment, and

[0784] 2. if startup has enabled frame transmission, and

[0785] 3. if the slot is configured to contain a sync frame, i.e. therespective slot counter matches pSyncSlot.

[0786] In the operation phase a frame shall be transmitted on a channel

[0787] 1. if the slot is assigned to the node via the frame ID andchannel specific assignment, and

[0788] 2. if the control state machine is in the operation state.

[0789] The frame shall be assembled as follows:

[0790] 1. The reserved bit shall be set to zero.

[0791] 2. The sync bit shall be set to one if the respective slotcounter vSlotCounter[ch] matches pSyncSlot, otherwise set to zero.

[0792] 3. The network management bit shall be set to the value held inthe CHI.

[0793] 4. The frame ID field shall be set to the value of the respectiveslot counter vSlotCounter[ch].

[0794] 5. The length field shall be set to gPayloadLengthStatic.

[0795] 6. The header CRC shall be set to the value held in the CHI.

[0796] 7. The cycle count field shall be set to the value of the currentcycle counter vCycle.

[0797] 8. If payload data is available from the CHI for the respectiveslot then

[0798] a. the null frame indication bit shall be set to zero, and

[0799] b. the payload data shall be set to the values received from theCHI, and

[0800] c. any remaining payload data bytes shall be set to the paddingpattern 0×00.

[0801] 9. If no payload data is available from the CHI for therespective slot then

[0802] a. the null frame indication bit shall be set to one, and

[0803] b. all payload data shall be set to the padding pattern 0×00.

[0804] 10. The frame CRC shall be calculated using the procedurespecified further on.

[0805] Timing and Slot Counter Housekeeping

[0806] All static slots shall consist of an equal number of gdStaticSlotmacroticks. The number of macroticks per static slot gdStaticSlot is aglobal constant for a given cluster and may range between 2 and TBD.

[0807] Each static slot contains an action point that shall be offsetfrom the start of the slot by gdActionPointOffset macroticks. Frametransmission shall start at the action point of the respective staticslot. The number of macroticks within the action point offsetgdActionPointOffset is a global constant for a given cluster and mayrange between 1 and TBD.

[0808] Appropriate configuration of the static slot length must assurethat the frame and the communication separator fit within the staticslot.

[0809]FIG. 10 depicts the detailed timing of the static slot.

[0810] At the end of every static slot the slot counter for channel AvSlotCounter[A] and the slot counter for channel B vSlotCounter[A] shallbe incremented by one (Note that this also holds for the last staticslot within the static segment).

[0811] Configuration

[0812] The static slot length gdStaticSlot shall be chosen such that thestatic slot accommodates not only the transmission of the frame but alsothe channel idle detection latency under worst-case assumptions (Theparameter gdStaticSlot shall be determined by an off-line configurationtool). The formula for determining this parameter and respectiveconstraints are specified further on. The formula for determining theparameter gdActionPointOffset and respective constraints are specifiedfurther on, too.

[0813] Dynamic Segment

[0814] Within the dynamic segment a dynamic mini-slotting based schemeshall be used to arbitrate transmissions. In this segment the durationof communication slots may vary in duration in order to accommodateframes of different length.

[0815] Structure

[0816] The dynamic segment shall consist of gNumberOfMiniSlots minislotsof equal duration. The number of minislots gNumberOfMiniSlots is aglobal constant for a given cluster and may range between 0 and tbd.

[0817] The dynamic segment also consists of a set of consecutive dynamicslots that contain one or multiple minislots. The duration of a dynamicslot depends on whether or not communication, i.e. frame transmission orreception, takes place. The duration of a dynamic slot shall beestablished on a per channel basis.

[0818] The condition of whether or not communication takes place shallbe evaluated at the end of every minislot:

[0819] The dynamic slot shall consist of one minislot if nocommunication takes place, i.e. the respective communication channel isin the channel idle state throughout the respective minislot.

[0820] The dynamic slot shall consist of multiple minislots ifcommunication takes place.

[0821] Details of how the duration of a dynamic slot is determined forframe transmissions are specified in the subsequent subsection. Detailsof how this is determined in the case of frame reception are specifiedfurther on.

[0822]FIG. 11 outlines the media access scheme within the dynamicsegment.

[0823] As shown in the figure the media access on the two communicationchannels does not occur in lock step. Both communication channels doshare, however, the same arbitration grid. FIG. 11 also shows how theduration of a dynamic slot adapts depending on whether or notcommunication takes place.

[0824] Transmission Condition

[0825] In the dynamic segment the condition that determine whether aframe shall be transmitted or not depend on the current protocol phase.

[0826] In the startup phase no frames shall be transmitted on eitherchannel.

[0827] In the operation phase a frame shall be transmitted on a channel

[0828] 1. if the slot is assigned to the node via the frame ID andchannel specific assignment, and

[0829] 2. if the dynamic segment has not exceeded the pLatestTxminislot, which is a node specific upper bound, and

[0830] 3. if the control state machine is in the operation state.

[0831] The frame shall be assembled as follows:

[0832] 1. The reserved bit shall be set to zero.

[0833] 2. The sync bit shall be set to zero.

[0834] 3. The network management bit shall be set to the value held inthe CHI.

[0835] 4. The frame ID field shall be set to the value of the respectiveslot counter vSlotCounter[ch].

[0836] 5. The length field shall be set to the number of payload databytes divided by two.

[0837] 6. The header CRC shall be set to the value held in the CHI.

[0838] 7. The cycle count field shall be set to the value of the currentcycle counter vCycle.

[0839] 8. If payload data is available from the CHI for the respectiveslot then

[0840] a. the null frame indication bit shall be set to zero, and

[0841] b. the payload data shall be set to the values received from theCHI, and

[0842] c. any remaining payload data bytes shall be set to the paddingpattern 0×00.

[0843] 9. If no payload data is available from the CHI for therespective slot then

[0844] a. the null frame indication bit shall be set to one, and

[0845] b. all payload data shall be set to the padding pattern 0×00.

[0846] 10. The frame CRC shall be calculated using the procedurespecified further on.

[0847] Timing and Slot Counter Housekeeping

[0848] Timing within the dynamic segment is based on minislots. Eachminislot shall contain an equal number of gdMinislot macroticks. Thenumber of macroticks per minislot gdMinislot is a global constant for agiven cluster and may range between 2 and tbd.

[0849] Each minislot contains an action point that shall be offset fromthe start of the minislot by gdMsActionPointOffset macroticks. Thenumber of macroticks within the minislot action point offsetgdMsActionPointOffset is a global constant for a given cluster and mayrange between 1 and tbd.

[0850]FIG. 12 shows the detailed timing of a minislot.

[0851] Frame transmission shall start at the minislot action point ofthe first minislot of the respective dynamic slot. In the dynamicsegment frame transmission shall also end at a minislot action point. Ifthe frame does not end at a minislot action point by virtue of its datalength, then the transmitter shall extend the transmission using thedynamic trailing sequence (DTS) as described further on. The DTSprevents premature idle detection by the receivers.

[0852] In contrast to a static slot the dynamic slot distinguishesbetween the transmission phase and the dynamic slot idle phase. Thetransmission phase ranges from the start of the dynamic slot to the lastminislot, in which the transmission terminates. The dynamic slot idlephase concludes the dynamic slot. The dynamic slot idle phase is definedas a communication-free phase that succeeds the transmission phase ineach dynamic slot. It is required to account for the communicationchannel idle detection latency and to process the frame by thereceivers.

[0853]FIG. 13 shows the detailed timing within the dynamic segment.

[0854] The start of the dynamic segment requires particular attention.The first action point in the dynamic segment shall occur aftermax(gdActionPointOffset, gdMsActionPointOffset) macroticks after the endof the static segment.

[0855] The two possible cases are illustrated in FIG. 14.

[0856] Each node shall perform slot counter housekeeping on a perchannel basis. At the end of every dynamic slot the respective slotcounter vSlotCounter[ch] shall be incremented by one until either

[0857] 1. the respective slot counter vSlotCounter[ch] has reachedcSlotIDMax, or

[0858] 2. the dynamic segment has reached the minislotgNumberOfMinislots, i.e. the end of the dynamic segment, or

[0859] Once one of these conditions is met the respective slot countershall be set to zero and further increments shall be suspended for therespective communication cycle.

[0860] The arbitration procedure assures that all fault-free receiversagree implicitly on the dynamic slot in which the transmission starts.Further, all fault-free receivers also agree implicitly on the minislotin which slot counting is resumed. As a result, the slot counter of allfault-free receivers matches the slot counter of the fault-freetransmitter and the frame identifier contained in the frame.

[0861] Configuration

[0862] Constraints concerning the configuration of the dynamic segmentare specified further on.

[0863] Symbol Window

[0864] Within the symbol window a single symbol may be sent, i.e. eithera normal symbol, an alarm symbol, a medium access test symbol or nosymbol at all shall be sent. In general, arbitration among differentsenders is not provided by the protocol for the symbol window. Ifarbitration among multiple senders is required for the symbol window ithas to be performed by means of a higher-level protocol.

[0865] Structure

[0866] The symbol window shall consist of a fixed number ofgdSymbolWindow macroticks. The number of macroticks per symbol windowgdSymbolWindow is a global constant for a given cluster and may rangebetween 0 and TBD.

[0867] Transmission Condition

[0868] As in the two communication segments the condition whether asymbol shall be transmitted or not differs depending on the currentprotocol phase.

[0869] In the startup phase no symbol shall be transmitted on eitherchannel.

[0870] In the operation phase a symbol shall be transmitted on a channel

[0871] 1. if a symbol is released for transmission, and

[0872] 2. if the control state machine is in the operation state.

[0873] Details specifying when a symbol is released for transmission arespecified further on.

[0874] Transmission Timing

[0875] The symbol window contains an action point that shall be offsetfrom the start of the slot by gdActionPointOffset macroticks. Symboltransmission shall start at the action point within the symbol window(see FIG. 15).

[0876] Configuration

[0877] Constraints concerning the configuration of the symbol window arespecified further on.

[0878] Network Idle Time

[0879] Within the network idle time the clock correction terms shall becalculated and the offset correction term shall be applied in one ormultiple macroticks. Details of the clock synchronization process aredescribed further on.

[0880] The network idle time shall also serve as a phase to performimplementation specific cluster cycle related tasks.

[0881] The network idle time shall contain gdNIT macroticks. The numberof macroticks within the network idle time gdNIT is a global constantfor a given cluster and may range between 1 and TBD.

[0882] Constraints on the duration of the network idle time arespecified further on.

[0883] Coding and Decoding

[0884] The following describes the coding and decoding methods used bythe FlexRay system.

[0885] Since the FlexRay protocol is independent from the underlyingphysical layer, the following describes the coding and decoding rules ofthe interface signals as seen by the communication controller (i.e.,TxENn, TxDn and RxDn, nε{A, B} in FIG. 16). Further on additionalinformation on this interface will be given.

[0886] In general, there are several non-ideal conditions (for example,clock oscillator differences, electrical characteristics of thetransmission media and transceivers, etc.) that can cause variations ofsignal timing or introduce anomalies/glitches into the communication bitstream. The coding and decoding mechanisms described below are intendedto be robust against such effects.

[0887] FlexRay uses a Non-Return to Zero (NRZ) signaling method forcoding and decoding of frames and symbols.

[0888] Bit Stream Coding with NRZ

[0889] This section specifies the mechanisms used to encode the logicalframes and symbols into a bit stream for transmission and how thetransmitting node presents this bit stream to the Bus Driver forcommunication onto the network. The sender shall start the transmissionof a frame or symbol by setting the TxENn signal to logical “0”. Thesender shall stop the transmission of a frame or symbol by setting theTxENn and the TxDn signals to logical “1”. The logical frame isdescribed further on.

[0890] Frame Coding

[0891] Frame coding transforms logical frames to a continuous bit streamby the following steps:

[0892] Dividing the logical frame into single byte components

[0893] Building byte sequences by adding a Byte Start Sequence (BSS) atthe beginning of each byte component

[0894] Assembling a continuous bit stream out of the byte sequences

[0895] Adding a Transmission Start Sequence (TSS) before the start ofthe bit stream

[0896] Appending a Frame End Sequence (FES) at the end of the bit stream

[0897] Appending a Dynamic Trailing Sequence (DTS) after the Frame EndSequence if the frame is transmitted in the dynamic segment of thecommunication cycle

[0898] Byte Coding

[0899] Each byte sequence shall begin with a Byte Start Sequence (BSS).The BSS consists of a logical “1” bit followed by a logical “0” bit. Abyte sequence consists of a BSS followed by eight data bits from thelogical frame.

[0900] Transmission of the data bits within a byte sequence shall besuch that the most significant bit of the data is transmitted first withthe remaining bits of the data being transmitted in decreasing order ofsignificance. This is shown in FIG. 17.

[0901] The purpose of the BSS is to provide bit stream timinginformation to receiving devices. The signal edge between the first andthe second bit of the BSS is used to realign the bit timing of thereceiver (i.e., bit clock resynchronization).

[0902] Transmission Start Sequence (TSS)

[0903] The Transmission Start Sequence (TSS) is inserted into the bitstream before the first byte sequence. The TSS consists of a continuouslogical “0” level. The duration of the TSS shall be configurable between1 to 15 nominal bit times.

[0904] Frame End Sequence (FES)

[0905] The Frame End Sequence (FES) is appended to the bit streamfollowing the final byte sequence. The FES is a two bit sequenceconsisting of a logical “0” bit followed by a logical “1” bit.

[0906] Dynamic Trailing Sequence (DTS)

[0907] A dynamic trailing sequence (DTS) shall be transmittedimmediately after the FES of a frame that is transmitted in the dynamicsegment of a communication cycle. The purpose of this sequence is toindicate the exact point in time of the minislot action point. The DTSstarts with a variable number of consecutive logical “0”s. The DTSlength is greater or equal to 1 bit. The DTS is concluded with thetransmission of a logical “1” bit. Note that the granularity of thelength of the “0” portion of the DTS is microticks rather than bits. Ingeneral, the trailing “0” to “1” transition is not synchronous to a bitcell boundary.

[0908] Entire Bit Stream for a Frame in the Static Segment

[0909]FIG. 18 shows the entire bit stream of a frame transmitted in thestatic segment.

[0910] At the completion of the FES the transmitting node shall set theTxENn signal to logical one.

[0911] Entire Bit Stream for a Frame in the Dynamic Segment

[0912]FIG. 19 shows the entire bit stream of a frame transmitted in thedynamic segment.

[0913] At the minislot action point the TxDn output shall switch tological “1” level, while TxENn shall switch to logical “1” one bitduration gdBit after the action point (This ensures that there is aduration of gdBit in which the TxDn output is at logical one prior tothe transition of TxENn to logical one. This is required for thestability of certain types of physical layers.).

[0914] Symbol Coding

[0915] The FlexRay communications protocol defines six symbols; each ofwhich is represented by specific bit pattern:

[0916] Status Normal Symbol (SNS)

[0917] Status Alarm Symbol (SAS)

[0918] Media Access Test Symbol (MTS)

[0919] Collision Avoidance Symbol (CAS)

[0920] Event Indication Symbol (EIS)

[0921] Wake-Up Symbol (WUS).

[0922] The bit stream of each symbol is described in the followingsections.

[0923] Status Normal Symbol (SNS)

[0924] The Status Normal Symbol shall be transmitted starting with theTransmission Start Sequence (TSS) followed by 2 gdBit times at a logical“1” level, 30 gdBit times at a logical “0” level, and a final gdBit timeat a logical “1” level as shown in FIG. 20.

[0925] Status Alarm Symbol (SAS)

[0926] The Status Alarm Symbol shall be transmitted starting with theTransmission Start Sequence (TSS), followed by 2 gdBit times at alogical “1” level, 20 gdBit times at a logical “0” level, and a finalgdBit time at a logical “1” level as shown in FIG. 21.

[0927] Collision Avoidance Symbol (CAS)

[0928] The Collision Avoidance Symbol shall be transmitted starting withthe Transmission Start Sequence (TSS), followed by 30 gdBit times at alogical “0” level as is shown in FIG. 22.

[0929] Media Access Test Symbol (MTS)

[0930] The Media Access Test Symbol (MTS) shall be encoded in the samemanner as the CAS symbol described above.

[0931] Event Indication Symbol (EIS)

[0932] The Event Indication Symbol (EIS) shall be encoded in the samemanner as the SNS symbol described above.

[0933] Wake-Up Symbol (WUS)

[0934] At the TxD output the Wake-Up Symbol shall be transmittedstarting with a configurable number of gdBit times at a logical “0”level (gdWakeupSymbolTxLow) followed by a configurable number of gdBittimes at a logical “1” level (gdWakeupSymbolTxIdle).

[0935] At the TxENn output the WUS shall be transmitted identically tothe TxD line, i.e., starting with a configurable number of gdBit timesat a logical “0” level (gdWakeupSymbolTxLow) followed by a configurablenumber of gdBit times at a logical “1” level (gdWakeupSymbolTxIdle).

[0936] The Wake-up symbol shall be repeated for a configurable number oftimes (gWakeupPattern). The minimum number of repetitions is 2. Theconfiguration parameters for the WUS are described more detail below. Anexample with a sequence of two WUS's is shown in FIG. 23.

[0937] Bit Stream Decoding with NRZ

[0938] This section specifies the mechanisms used to perform bit streamdecoding, including the relevant parameter limits and configurationparameters with this function. The decoding function interprets the bitstream observed at the RxDn inputs of the CC.

[0939] The block diagram in FIG. 24 shows the control flow of thereceive signals through the Bit Stream Decoding (BSD) unit.

[0940] The bit stream decoding processes bit streams present on thephysical media, extracts logical frame and symbol information, andpasses this information to the FlexRay protocol engine. The followingsteps are performed:

[0941] Bit clock alignment at dedicated edges during the bit streamdetected at the RxDn input

[0942] Bit sampling and voting based on the aligned bit clock

[0943] Decoding of frame and symbol information from the bit samplingand voting output

[0944] The bit stream decoding processes of the individual channels on amultiple channel FlexRay node operate independently from one another.Specifically, the bit clock alignment, edge detection, sample voting,frame decoding, and symbol detection processes on the individualchannels must be capable of independent operation.

[0945] Bit Clock Alignment

[0946] The Bit Clock Alignment function (BCA) synchronizes the local bitclock used for bit sampling and voting to the received bit stream at theRxDn input.

[0947] Edge Detection Window Control

[0948] The edge detection window determines the time window in which thenext edge for bit clock alignment is expected. This window is set duringframe reception around the expected logical “1” to “0” transitionbetween the two bits of the next BSS.

[0949] Initial Edge Detection Window Determination

[0950] The initialization of the BCA is started as soon as channel idleis detected at RxDn (and signaled to the BCA via the decoder unit). FIG.25 shows the mechanism that determines the initial edge detection windowwhen a frame is received. If the received bit stream is not a frame(e.g., symbol reception), the BCA shall be deactivated until the nextchannel idle is signaled to the BCA via the decoder unit.

[0951] The initialization of the BCA is performed through the followingsteps:

[0952] Falling edge detection (potential start of a frame, i.e., thestart of a TSS)

[0953] Rising edge detection (potential start of BSS)

[0954] Falling edge detection (potential falling edge in the middle ofthe BSS)

[0955] Alignment of bit stream to that falling edge

[0956] First edge detection window determination

[0957] Start of Frame Detection

[0958] After channel idle the BCA waits for a falling edge that ispotentially the start of a frame (TSS). In order to filter out glitches,a continuous number of pVotingSamples samples are taken for majorityvoting to validate the occurrence of the edge (see FIG. 25 withpVotingSamples=3).

[0959] If the majority of pVotingSamples consecutive samples is logical“0”, a valid falling edge has been detected.

[0960] Start of BSS Detection

[0961] After detecting a valid falling edge the BCA waits for a risingedge that is potentially the start of a BSS. In order to filter outglitches, a continuous number of pVotingSamples samples are taken formajority voting to validate the occurrence of the edge (see FIG. 25 withpVotingSamples=3).

[0962] If the majority of pVotingSamples consecutive samples is logical“1”, a valid rising edge has been detected.

[0963] Falling Edge Detection in the Middle of the BSS

[0964] After detecting a valid rising edge the BCA waits for a fallingedge that is potentially the middle of a BSS. In order to filter outglitches, a continuous number of pVotingSamples samples are taken formajority voting to validate the occurrence of the edge (see FIG. 25 withpVotingSamples=3).

[0965] If the majority of pVotingSamples consecutive samples are logical“0”, a valid falling edge has been detected.

[0966] Alignment of Bit Stream

[0967] After detecting a valid falling edge the bit clock is aligned tothe bit stream as seen in FIG. 26.

[0968] The first sample of the next bit is determined by the centralsample of the voting window. FIG. 26 shows an example withpVotingSamples=3, where the second sample of the voting window shall beconsidered to be the first sample of the next bit. After aligning thebit sampling to this particular sample in the BSS, the first sample ofeach consecutive bit of the next byte is considered to occurpSamplesPerBit after first sample of the previous bit.

[0969] First Edge Detection Window Determination

[0970] The falling edge of the next BSS is expected 10*pSamplesPerBitsamples after the falling edge of the current BSS. The bit time windowis placed symmetrically around the expected edge in the next BSS with asize of 6 samples, i.e., the next edge detection window is set fromthree samples before to three samples after that expected falling edge(see FIG. 27).

[0971] Bit Clock Alignment

[0972] During the edge detection window, the number of samples thatequal logical “0” is counted as vEdgeLowSamples. Three cases have to bedistinguished:

[0973] Case 1: vEdgeLowSamples=pEdgeSamples/2

[0974] In this case, the bit clock alignment is assumed to be correct.The falling edge is detected at the expected falling edge (see FIG. 28).

[0975] Case 2: vEdgeLowSamples>pEdgeSamples/2

[0976] In this case, the bit clock has to be aligned by −1 sample point(see FIG. 29).

[0977] Case 3: vEdgeLowSamples<pEdgeSamples/2

[0978] In this case, the bit clock has to be aligned by +1 sample (seeFIG. 30).

[0979] In general, shifting the bit start time is limited to plus orminus one sample point.

[0980] If there is no falling edge detected during the edge detectionwindow (i.e., all samples have the same value), the resynchronization ofthe next bit sampling is performed according to the following rules

[0981] If only logical “0” values are sampled in the edge detectionwindow, the bit clock is aligned −1 sample relative to the expectedfalling edge.

[0982] If only logical “1” values are sampled in the edge detectionwindow, the bit clock is aligned +1 sample relative to the expectedfalling edge.

[0983] This condition does not constitute a coding error.

[0984] Edge Detection Window Determination During Frame Reception

[0985] The next edge detection window is determined from the aligned bitclock of the current detected falling edge. The falling edge of the nextBSS is expected 10* pSamplesPerBit after the current detected fallingedge. The bit time window is placed symmetrically around the expectededge in the next BSS, i.e., the next edge detection window is set fromthree samples before to three samples after that expected falling edge(see FIG. 27).

[0986] Bit Sampling and Voting

[0987] The bit sampling and voting function decides whether the currentbit value is to be considered as logical “1” or as logical “0”. Thisdetermination shall be performed on the signals RXDA and RXDB.

[0988] Initial Bit Start Determination

[0989] After initialization of the CC, the BSD unit starts bit samplingimmediately, i.e., the local bit clock is started immediately and thebit stream is sampled with this (unaligned) bit clock. The first bit isassumed to start with the first sample. Bit clock alignment startsindependently as described above. The number of samples of a bit isconfigured by the parameter pSamplesPerBit. pSamplesPerBit can be either8 or 10. Each consecutive bit is assumed to start pSamplesPerBit afterit's predecessor bit. FIG. 31 shows an example of bit sampling withpSamplesPerBit=10.

[0990] Resynchronization of Bit Sampling

[0991] Once the bit clock alignment is activated, bit sampling isresynchronized to the received bit stream by using the aligned bitclock. The resynchronization of the bit sampling is only performed atthe falling edges in the BSS. In general, the first sample of the nextbit shall be set to the sample following the falling edge detected bythe BCA. This mechanism is illustrated in FIG. 32.

[0992] After bit clock alignment bit sampling is performed withoutresynchronization for the next ten bits, i.e., until the falling edge ofthe next BSS.

[0993] Bit Value Voting

[0994] The number of samples to be considered for majority voting shallbe odd. It is recommended to center the voting window on the supposedcenter of the bit cell. The sample voting process defines a “window” ofsamples that are used to make the determination of the value of areceived bit. This window is characterized by two parameters,pVotingOffset and pVotingSamples. An example with pVotingOffset=3 andpVotingSamples=5 is shown for the case of pSamplesPerBit=10 in FIG. 33.

[0995] The parameter pVotingOffset specifies the offset between the1^(st) sample of the bit and the start of the voting window. This offsetdefines the first sample of the bit that will be considered for thevoting. Specifically, the first sample considered for voting is thesample after the first pVotingOffset samples of the bit (i.e., votingstarts after pVotingOffset samples have been “skipped”).

[0996] The pVotingSamples parameter specifies the number of samples inthe voting window. The window is defined by taking pVotingSamplesconsecutive samples starting with the sample indicated by pVotingOffset.

[0997] The bit value shall be determined by majority voting over thesamples within the voting window (This implies that the number ofsamples within the voting window, pVotingSamples, must be odd.), i.e.,if a majority of samples within the voting window have logical value“0”, the output value of the sampled bit shall be “0”; if a majority ofsamples within the voting window have logical value “1” the output valueof the sampled bit shall be “1”.

[0998] Note the voting window and the bit sampling shall beresynchronized with every edge between the two bits of the Byte StartSequence (BSS). This is the only edge to be used for theresynchronization.

[0999] Frame and Symbol Decoding

[1000] Note that due to certain effects on the physical transmissionmedium (e.g., optical transmission, truncation due to connection setupin the star coupler, etc.), it is possible that the TSS seen at the RxDninput may be shorter or longer than the TSS that was transmitted. Allreceivers shall accept Transmission Start Sequences with any duration inthe range of 1 to 16 bit times (inclusive).

[1001] A valid start of frame or symbol shall be considered when thefollowing conditions are met:

[1002] the channel was detected as idle and there was at least onetransition from logical “1” to logical “0” and

[1003] the bit value associated with the transition being considered asstart of the bit cell was considered to be logical “0” (bit value votingresult)

[1004] Note: for glitch filtering and bit start time alignment at startof frame and/or symbol see the bit clock alignment section in thischapter.

[1005] Frame Decoding

[1006] The frame coding status shall be “valid coding”, if the followingconditions are met:

[1007] the TSS length was detected to be at least 1 bit and less orequal to 16 bits, and

[1008] all the expected BSS's were successfully detected (i.e. the firstbit of the BSS was voted as a logical “1” and the second bit was votedas a logical “0”), and

[1009] the FES was successfully detected (i.e. the first bit of the FESwas voted as a logical “0” and the second bit was voted as a logical“1”).

[1010] Once the decoder unit detects an FES instead of an expected BSS,the BCA function is deactivated until channel idle is detected.

[1011] SNS Decoding

[1012] The detection of an SNS symbol shall be considered as “validcoding” if the following conditions are met:

[1013] a TSS is detected with a duration between 1 and 16 gdBit, and

[1014] two gdBit times logical “1” is detected, and

[1015] a subsequent logical “0” level is detected for a duration of 27gdbit<t_(—) _(^(sns)) _(—) _(⁰) <33 bit

[1016] SAS Decoding

[1017] The detection of an SAS symbol shall be considered as “validcoding” if the following conditions are met:

[1018] a TSS is detected with a duration between 1 and 16 gdBit, and

[1019] two gdBit times logical “1” is detected, and

[1020] a subsequent logical “0” level is detected for a duration of 18gdBit<t_(—) _(^(sas)) _(—) _(⁰) <22 gdBit

[1021] EIS Decoding

[1022] The detection of an EIS symbol shall be considered as “validcoding” if the same conditions are met as for SNS decoding (see above).

[1023] CAS Decoding

[1024] The detection of a CAS symbol shall be considered as “validcoding” if the following condition is met:

[1025] the TSS is detected with a duration between 1 and 16 gdBit, and

[1026] a logical “0” level is detected for a duration of 27 gdbit<t_(—)_(^(cas)) _(—) _(⁰) <33 gdBit

[1027] MTS Decoding

[1028] The detection of an MTS symbol shall be considered as “validcoding” if the same condition is met as for CAS decoding (see above).

[1029] WUS Decoding

[1030] The detection of a WUS symbol shall be considered as “validcoding” if the following condition is met:

[1031] a duration between 1 gdBit and gdWakeupSymbolRxLow at a logical“0” level is detected.

[1032] Channel Idle Detection

[1033] The channel idle detection function is located in the decoder,using the input from the sampling and voting unit. The channel idledetection function is always active, including, for example duringongoing frame and/or symbol detection. When the CC is in low power modeand/or in the CC configuration state, then channel idle detectionsupport is not performed.

[1034] Upon exiting the CC configuration state and/or the CC low powermode, the channel shall initially be assumed to be busy (i.e. not idle).The behavior is also required when an undefined communication element isdetected.

[1035] The channel shall be considered to be idle as soon as 12consecutive bits with the data value logical ‘1’ have been detected.

[1036] Presence of glitches while the channel is idle does not establisha coding error condition and there shall be no re-start of the channelidle detection timer. The channel idle detection counter shall bere-started when a logical “1” to “0” transition was detected where theassociated bit voting result was “0”.

[1037] If the next start of frame or symbol is detected earlier thanafter successful channel idle detection then this establishes a channelidle condition violation (but not a coding error) and shall be signaledto the host.

[1038] Coding Error Signaling

[1039] After a frame or symbol start is detected, i.e., if a transitionfrom channel idle to logical “0” is observed at RxDn and none of theconditions described in section 0 hold, the coding status shall be“invalid coding”.

[1040] After a valid frame or symbol is received, the CC shall performthe channel idle check. If the consecutive 12 bits after end of frame orsymbol are not logical “1” a “channel idle coding violation” shall besignaled to the host.

[1041] Device is in Sleep Mode

[1042] As soon as a logical “0” condition is detected, this conditionshall be captured and be considered as a potential start of a wakeupsymbol. If the wakeup condition is verified as “valid”, then theappropriate startup actions shall be performed (see below), otherwisethe device shall continue to stay in sleep mode.

[1043] Configuration Parameters

[1044] In order to be able to support a suitable set of different bitrates without having to modify the oscillator frequency, the number ofsamples per bit pSamplesPerBit shall be configurable to either 8 or 10.In addition, a scalable oscillator clock period multiplier shouldtypically be provided. At a minimum, the node shall support clock periodmultiplier settings (prescaler settings) of 1, 2, 4, 8, and 16. Thesupported bit rates depend on the oscillator frequency that is used, theprescaler setting, and the samples per bit setting.

[1045] The following Table 7 gives an example of supported bit rateswith a 12.5 ns oscillator period (e.g, f_osc=80 MHz nominal.). TABLE 7Example of supported bit rates with a 12.5 ns oscillator period SampleSample Clock Clock Period Samples per Bit Time Bit Rate Index Prescaler(ns) Bit (ns) (Mbps) 1 1 12.5 8 100 10.000 2 1 12.5 10 125 8.000 3 225.0 8 200 5.000 4 2 25.0 10 250 4.000 5 4 50.0 8 400 2.500 6 4 50.0 10500 2.000 7 8 100.0 8 800 1.250 8 8 100.0 10 1000 1.000 9 16 200.0 81600 0.625 10 16 200.0 10 2000 0.500

[1046] Overview

[1047] The following describes the supported frame formats used by theFlexRay protocol and gives an overview. Then the description focuses onthe frame formats.

[1048] The FlexRay protocol supports two distinct frame formats:

[1049] the FlexRay frame format

[1050] the byteflight frame format

[1051] All controllers in a cluster must be configured to use the sameframe format. Specifically, a system in which some controllers use theFlexRay frame format while other controllers use the byteflight frameformat is not a valid system configuration.

[1052] The FlexRay frame format may be used for systems intime-triggered distributed mode (TT-D mode), in time-triggeredmaster-controlled mode (TT-M mode), or event-triggered mode (ET mode).

[1053] The byteflight frame format may only be used in systems operatingin byteflight mode (BF mode).

[1054] Both frame formats contain a header segment, a payload segmentand a trailer segment, each of which contains specific fields. These aredescribed for the FlexRay and byteflight frame formats, and illustrated,respectively, in FIG. 34 and FIG. 35.

[1055] FlexRay Frame Format

[1056] An overview of the FlexRay frame format is given in FIG. 34. Theframe shall be transmitted on the network such that the header segmentappears first, followed by the payload segment, and then followed by thetrailer segment, which is transmitted last.

[1057] FlexRay Header Segment

[1058] The FlexRay header segment consists of 5 bytes that containseveral distinct fields; a reserved bit, a Network Management IndicationBit, a Null Frame Indication Bit, a Sync Bit, a Frame ID field, aPayload Length field, a Header CRC field, and a Cycle Counter field.These fields are described in detail in the following sections.

[1059] Within the header segment the fields shall be transmitted in theorder indicated in FIG. 34, moving from left to right (i.e., theReserved bit is transmitted first and the Cycle Counter field istransmitted last).

[1060] Reserved Bit (1 bit—fReservedBit)

[1061] This field consists of one bit that is reserved for futureprotocol use. This bit shall not be used by the application.

[1062] In a transmitting node the Reserved bit shall be set to logical‘O’.

[1063] In a receiving node the Reserved bit shall be ignored (Thereceiver uses the value of the Reserved Bit for the Frame CRC checkingprocess, but otherwise ignores its value (i.e., the receiver shallaccept either a 1 or a 0 in this field).).

[1064] Network Management Indication Bit (1 bit—fNMIndicationBit)

[1065] This field indicates whether an optional network managementvector is contained within the payload section of the frame.

[1066] If the network management indication bit is set tofNMIndicationBit=1 the payload section of the frame contains a networkmanagement vector.

[1067] If the network management indication bit is set tofNMIndicationBit=0 the payload section of the frame does not contain anetwork management vector.

[1068] Null Frame Indication Bit (1 bit—fNullFrameIndicationBit) TheNull Frame Indication bit fNullFrameIndicationBit indicates whether thecurrent frame is a “null frame”, i.e., a frame that contains no usabledata in the payload segment of the frame. (The Null frame indication bitindicates only whether valid data was available to the communicationscontroller at the time the frame was sent. A Null Frame Indication Bitset to 1 means that received data in the payload segment is not valid.If the bit is set to 0 the data in the payload segment is valid from thetransmitting communication controller's point of view. The receiver mayhave to do several other checks to decide whether the data is actuallyvalid.)

[1069] If the Null frame indication bit is set tofNullFrameIndicationBit=1 the payload segment contains no valid data.

[1070] If the Null frame indication bit is set tofNullFrameIndicationBit=0 the payload segment contains data.

[1071] Further information on null frames may be found below.

[1072] Sync Bit (1 bit—fSyncBit)

[1073] The sync bit fSyncBit determines whether the frame is to be usedfor various aspects of system synchronization.

[1074] If the Sync Bit is set to fSyncBit=1 the frame is a candidate tobe used for synchronization if it meets other criteria (see below).

[1075] If the Sync Bit is set to fSyncBit=0 the frame shall not be usedfor synchronization.

[1076] Examples of protocol mechanisms that make use of the Sync Bitinclude clock synchronization (described further on) and startup(described further on). In all cases, the condition fSyncBit=1 is onlyone of several conditions necessary for the frame to be used in thevarious synchronization mechanisms.

[1077] All frames transmitted in the dynamic segment (if present) shallbe sent with fSyncBit=0.

[1078] If a node transmits a given frame on more than one channel itshall set fSyncBit to the same value on each channel.

[1079] A node shall not transmit a frame with fSyncBit=1 in more thanone slot of a given communication cycle. If a node does transmit frameswith fSyncBit=1, it shall do so in the same slot of every communicationcycle.

[1080] A node shall only transmit a frame with fSyncBit=1 in a givenslot of a communication cycle if it is configured to transmit on allconfigured channels for that slot (This implies that nodes transmittingframes with fSyncBit=1 on dual channel systems must transmit that frameon both channels of the system. Single channel systems implicitly meetthis requirement—all frames are transmitted on all configuredchannels.).

[1081] Frame ID (12 bits—fFrameID)

[1082] This field contains the Frame Identifier for the frame. Eachframe that may be transmitted in a cluster has a frame ID fFrameIDassigned.

[1083] The frame ID fFrameID is a unique number per communicationchannel per communication cycle and defines the slot in which the frameis transmitted.

[1084] Valid values for fFrameID range from 1 to 4095 (In binary: from(0000 0000 0001)₂ to (1111 1111 1111)₂) during the protocol operationphase (POP). The Frame ID 0 is an invalid Frame ID.

[1085] The Frame ID field shall be transmitted such that the mostsignificant bit of fFrameID is transmitted first with the remaining bitsof fFrameID being transmitted in decreasing order of significance.

[1086] Payload Length (7 bits—fPayloadLength)

[1087] The Payload Length field consists of a single parameter,fPayloadLength, that is related to the number of bytes contained in thepayload segment of the frame. Specifically, fPayloadLength indicates thenumber of bytes in the payload segment divided by two. For example, aframe that contains a payload segment consisting of 72 bytes would besent with fPayloadLength=36. A detailed definition of the contents ofthe payload segment of a FlexRay frame can be found below.

[1088] The payload length field does not include the number of byteswithin the header and the trailer segments of the FlexRay frame.

[1089] The maximum payload length is cPayloadLengthMax, whichcorresponds to a payload segment containing 2*cPayloadLengthMax bytes.The payload field shall be less than or equal to the maximum payloadlength: fPayloadLength≦cPayloadLengthMax.

[1090] The payload length shall be fixed for all frames in the staticsegment of a communication cycle. For these frames the payload lengthfield shall be transmitted with fPayloadLength gPayloadLengthStatic.

[1091] The payload length fPayloadLength may be different for differentframes in the dynamic segment of a communication cycle. In addition, thepayload length of a specific dynamic segment frame may vary from cycleto cycle. Finally, the payload lengths of a specific dynamic segmentframe may be different on each configured channel. All dynamic segmentframes, however, shall have 0≦fPayloadLength≦cPayloadLengthMax.

[1092] The Payload Length field shall be transmitted such that the mostsignificant bit of fPayloadLength is transmitted first with theremaining bits of fPayloadLength being transmitted in decreasing orderof significance.

[1093] Header CRC (11 bits—fHeaderCRC)

[1094] The Header CRC field contains a Cyclic Redundancy Check code(CRC) computed over the Sync Bit, Frame ID, and Payload Length fields ofthe frame.

[1095] The CRC is computed in the same manner on all configuredchannels. The CRC polynomial shall be

x¹¹+x⁹+x⁸+x⁷+x²+1=(x+1)(x⁵+x³+1)(x⁵+x⁴+x³+x+1)

[1096] This 11 bit CRC polynomial generates a (31,20) BCH code that hasa minimum Hamming distance of 6. The codeword consists of the data to beprotected and the CRC. In this application, this CRC protects exactly 20bits of data (1 bit sync+12 bits frame ID+7 bits payload length=20bits). This polynomial was obtained from T. Wadayama, Average Distortionof Some Cyclic Codes, web site available athttp://vega.c.oka-pu.jp/˜wadayama/distortion.html, and its propertieswere verified using the techniques described in P. Koopman, “32-bitCyclic Redundancy Codes for Internet Applications,” Proceedings of theInternational Conference on Dependable Systems and Networks (DSN 2002),Washington D.C., June 2002, pp. 459-468. The initialization vector ofthe register used to generate the header CRC shall be (1A)_(HEX).

[1097] With respect to the computation of fHeaderCRC, the Sync Bit, theFrame ID and the Payload Length fields shall be fed into the CRCgenerator in network order, specifically the Sync Bit shall be shiftedin first, followed by the most significant bit of the Frame ID field,followed by subsequent bits of the Frame ID, followed by the mostsignificant bit of the Payload Length field, and followed by subsequentbits of the Payload Length field.

[1098] The Header CRC field shall be transmitted such that the mostsignificant bit of fHeaderCRC is transmitted first with the remainingbits of fHeaderCRC being transmitted in decreasing order ofsignificance.

[1099] A detailed description of how to generate or verify the HeaderCRC is given further on.

[1100] Cycle Counter (6 bits—fCycleCount)

[1101] The Cycle Counter field indicates the transmitting node's view ofthe cycle counter vCycle at the time of frame transmission.

[1102] The Cycle Counter field shall be set to fCycleCount=vcycle beforetransmitting a frame.

[1103] The Cycle Counter field shall be transmitted such that the mostsignificant bit of fCycleCount is transmitted first with the remainingbits of fCycleCount being transmitted in decreasing order ofsignificance.

[1104] FlexRay Payload Segment

[1105] The FlexRay payload segment contains 0 to 254 bytes (0 to 127two-byte-words) of data written by the host.

[1106] Because of the limitations imposed on the representation of thelength of the payload segment by the Payload Length field(fPayloadLength) of the header segment, the FlexRay Payload Segmentshall consist of an even number of bytes. (The length of the payloadsegment indicated by fPayloadLength correlates with the number of bytesthat are sent on the communication channel. It does not necessarilydefine the number of bytes used by the application in the payloadsection. The data provided by the application may be shorter than thepayload section. A padding function in the communication controllerfills the “missing” bytes if the configured transmit buffer is smallerthan the configured payload length.)

[1107] Note that the frame CRC described below has a Hamming distance ofsix for payload lengths up to 248 bytes. For payload lengths greaterthan 248 bytes the CRC only provides a Hamming distance of four.

[1108] The first two bytes of the FlexRay payload segment may optionallybe used as a message ID field, allowing receiving nodes to filter orsteer data based on the contents of this field.

[1109] The subsequent bytes of the payload segment may optionally beused as network management vector. The length of the network managementvector is configured by gNetworkManagementVectorLength duringCC_SoftReset and cannot be changed during the protocol startup phase(PSP) or during the protocol operation phase (POP).gNetworkManagementVectorLength can be configured between 0 and 12 bytes,inclusive. The network management indication bit in the frame headerindicates whether the payload section contains the network managementvector (Frames that contain network management data are not restrictedto containing only network management data—the other bytes in thepayload section may be used to convey additional, non-Network Managementdata.).

[1110] If the optional message ID field is not used the networkmanagement vector (if present) starts with the first byte of the payloadsection.

[1111] The individual bytes within the Payload Segment shall betransmitted such that the most significant bit of the byte istransmitted first with the remaining bits of the byte being transmittedin decreasing order of significance.

[1112] FlexRay Trailer Segment

[1113] The FlexRay trailer segment contains a single field, a 24-bit CRCfor the frame.

[1114] Frame CRC (24 bits—fFrameCRC)

[1115] The Frame CRC field contains a Cyclic Redundancy Check code (CRC)computed over the Header and Payload segments of the frame. Thecomputation includes all fields in these segments (This includes theheader CRC, as well as any Communication Controller-generated “padding”bytes that may be included in the Payload segment.).

[1116] The CRC is computed using the same generator polynomial on bothchannels. The CRC polynomial shall be

x²⁴+x²²+x²⁰+x¹⁹+x¹⁸+x¹⁶+x¹⁴+x¹³+x¹¹+x¹⁰+x⁸+x⁷+x⁶+x³+x+1=(x+1)²(x¹¹+x⁹+x⁸+x⁷+x⁵+x³+x²+x+1)(x¹¹+x⁹+x⁸+x⁷+x⁶+x³+1)

[1117] This 24-bit CRC polynomial generates a code that has a minimumHamming distance of 6 for codewords up to 2048 bits in length and aminimum Hamming distance of 4 for codewords up to 4094 bits in length.The codeword consists of all frame data and the CRC. This corresponds toH=6 protection for FlexRay frames with payload lengths up to 248 bytesand H=4 protection for longer payload lengths. This polynomial wasobtained from G. Castagnoli, S. Bräuer, and M. Herrmann, “Optimizationof Cyclic Redundancy-Check Codes with 24 and 32 Parity Bits,” IEEETrans. Commun., vol. 41, pp. 883-892, June 1993., and its propertieswere verified using the techniques described in P. Koopman, “32-bitCyclic Redundancy Codes for Internet Applications,” Proceedings of theInternational Conference on Dependable Systems and Networks (DSN 2002),Washington D.C., June 2002, pp. 459-468.

[1118] The generation process of the CRC differs slightly depending onwhich channel the frame is being transmitted (Different initializationvectors are defined to prevent a node from communicating if it hascrossed channels, connection of a single channel node to the wrongchannel, or shorted channels (both controller channels connected to thesame physical channel).):

[1119] The initialization vector of the CRC generator shall be (FE DCBA)_(HEX) for frames sent on channel A.

[1120] The initialization vector of the CRC generator shall be (AB CDEF)_(HEX) for frames sent on channel B.

[1121] With respect to the computation of fFrameCRC, the frame fieldsshall be fed into the CRC generator in network order (that is, the firstthing into the generator is the most significant bit of the Reserved Bitfield, and the last thing into the generator is the least significantbit of the last byte of the Payload Segment).

[1122] The Frame CRC field shall be transmitted such that the mostsignificant bit of fFrameCRC is transmitted first with the remainingbits of fFrameCRC being transmitted in decreasing order of significance.

[1123] A detailed description of how to generate or verify the Frame CRCis given further on.

[1124] Null Frames

[1125] Under certain conditions a transmitting node may send a “nullframe” which is a frame that contains no valid data in the payloadsegment. Such a frame is sent when a transmitter is configured to sendin a given slot and channel of the static segment but is not inpossession of valid data at the time when transmission of that slot isscheduled to begin. This could be caused by the host locking a transmitbuffer and not releasing it before transmission time, or by atransmitter being configured for cycle counter filtering (see furtheron) and the current cycle counter does not match the filter.Additionally, a transmitting controller may indicate a null frame if thehost has not successfully updated the data since the last scheduledtransmission. This behavior is optional (see further on). Thetransmitter indicates a null frame by setting fNullFrameIndicationBit=1.

[1126] A Null Frame consists of

[1127] A header segment as described above, which hasfNullFrameIndicationBit=1

[1128] A payload segment with all bits set to zero

[1129] A trailer segment as described above.

[1130] Null frames shall only be sent in the static segment, hence thepayload length is defined by gPayloadLengthStatic.

[1131] The payload segment of a Null Frame shall be ignored by thereceiver (The receiver uses the data in the Payload Segment for theFrame CRC checking process, but otherwise ignores the data.) but otherfields of the frame may contain useful data (For example, the clocksynchronization algorithm may make use of the arrival time of nullframes with the Sync Bit field set to 1 (provided all other criteria forthat frame's acceptance are met).).

[1132] byteflight Frame Format

[1133] An overview of the byteflight frame format is given in FIG. 35.The frame shall be transmitted on the network such that the headersegment appears first, followed by the payload segment, and thenfollowed by the trailer segment, which is transmitted last.

[1134] byteflight Header Segment

[1135] The byteflight header segment consists of 2 bytes that containseveral distinct fields; the Frame ID, a field of reserved bits, and theframe length. These fields are described in detail in the followingsections.

[1136] Within the header segment the fields shall be transmitted in theorder indicated in FIG. 35, moving from left to right (i.e., the FrameID field is transmitted first and the Frame Length field is transmittedlast).

[1137] Frame ID (8 bits—fBfFrameID)

[1138] This field contains the Frame Identifier for the frame. Eachframe that may be transmitted in a cluster has a frame ID fBfFrameIDassigned.

[1139] The frame ID fBfFramelD is a unique number per communicationcycle and defines the minislot in which the frame is transmitted.

[1140] Valid values for fBfFrameID range from (0000 0001)₂ to (11111111)₂.

[1141] The Frame ID field shall be transmitted such that the mostsignificant bit of fBfFrameID is transmitted first with the remainingbits of fBfFrameID being transmitted in decreasing order ofsignificance.

[1142] Special Application Bits (4 bits—fBfSpecialApplBits)

[1143] This field consists of four bits that may are used by theapplication.

[1144] The fBfSpecialApplBits field shall be transmitted such that themost significant bit of fBfSpecialApplBits is transmitted first with theremaining bits of fBfSpecialApplBits being transmitted in decreasingorder of significance.

[1145] The fBfSpecialApplBits field in the transmitting node is writtenby the host (The four special application bits are written by the hostof the transmitting node. The communication controllers on all nodes(transmitter and receiver) treat these bits as application data.).

[1146] Frame Length (4 bits—fBfFrameLength)

[1147] The Frame Length consists of a single parameter, fBfFrameLength,which indicates the number of data bytes that are contained in thepayload segment of the frame.

[1148] The frame length field does not include the number of byteswithin the header and the trailer segment of the byteflight frame.

[1149] The shortest possible length is 0 bytes (fBfFrameLength=(0000)₂),the longest length is 12 bytes (fBfFrameLength=(1100)₂). A frame whichis received with fBfFrameLength greater than 12 shall be treated as anerror.

[1150] The Frame Length field shall be transmitted such that the mostsignificant bit of fBfFrameLength is transmitted first with theremaining bits of fBfFrameLength being transmitted in decreasing orderof significance.

[1151] byteflight Payload Segment

[1152] The byteflight payload segment consists of 0 to 12 bytes of datawritten by the host.

[1153] The individual bytes within the Payload Segment shall betransmitted such that the most significant bit of the byte istransmitted first with the remaining bits of the byte being transmittedin decreasing order of significance.

[1154] byteflight Trailer Segment

[1155] The byteflight trailer segment consists of 2 bytes that containtwo distinct fields; a Frame CRC and the Frame Completion Bit. Thesefields are described in detail in the following sections.

[1156] Within the trailer segment the fields shall be transmitted in theorder indicated in FIG. 35, moving from left to right (i.e., the FrameCRC field is transmitted first and the Frame Completion Bit istransmitted last).

[1157] Frame CRC (15 bits—fBfFrameCRC)

[1158] The Frame CRC field contains a Cyclic Redundancy Check code (CRC)computed over the Header and Payload segments of the frame. Thecomputation includes all fields in these segments.

[1159] The CRC generator polynomial shall be

x¹⁵+x¹⁴+x¹⁰+x⁸+x⁷+x⁴+x³+1

[1160] This is the same polynomial as used in the CAN protocol asdefined in ISO/DIS 11898-1:1999, Road vehicles—Controller area network(CAN)—Part 1: Data Link Layer and Physical Signaling, InternationalStandards Organization, 1999. It is optimized for code words of up to127 bits.

[1161] The initialization vector of the byteflight Frame CRC shall be(00)_(Hex).

[1162] With respect to the computation of fBfFrameCRC, the frame fieldsshall be fed into the CRC generator in network order (that is, the firstthing into the generator is the most significant bit of the Frame IDfield, and the last thing into the generator is the least significantbit of the last byte of the Payload Segment).

[1163] The Frame CRC field shall be transmitted such that the mostsignificant bit of fBfFrameCRC is transmitted first with the remainingbits of fBfFrameCRC being transmitted in decreasing order ofsignificance.

[1164] A detailed description of how to generate or verify the Frame CRCis given below.

[1165] Frame Completion Bit (1 bit—fBfFCB)

[1166] The Frame Completion Bit, fBfFCB, is a single bit whose solepurpose is to allow the byteflight frame to end on a byte boundary.

[1167] The Frame Completion Bit field shall be transmitted withfBfFCB=0.

[1168] Dependencies

[1169] Message ID (optional, 16 bits—fMessageID)

[1170] The first two bytes of the payload segment of the FlexRay frameformat can be used as receiver filterable data called Message ID.

[1171] The Message ID is an application determinable number thatdescribes the contents of the data segment.

[1172] The Message ID is 16 bits long.

[1173] At the transmitter the Message ID is written by the host asapplication data. The communication controller has no knowledge aboutthe message ID and no mechanism inside the communication controller isbased on the message ID.

[1174] At the receiver the storage of a frame may depend on the resultof a filtering process that makes use of the Message ID. All framechecks done in Frame Processing (see further on) are unmodified (i.e.,are not a function of the Message ID). The use of the Message ID filteris defined in the Host Interface chapter (see further on).

[1175] The optional use of Message IDs must be consistent in all framesin the whole cluster (Consistency means that a Message ID is used forALL frames (both static and dynamic) in a cluster or it is not used forANY frame. Partial use of the Message ID is not possible.).

[1176] If this mechanism is used, the most significant bit of fMessageIDshall be placed in the most significant bit of the first byte of thepayload segment. Subsequent bits of fMessageID shall be placed in thenext payload bits in order of decreasing significance.

[1177] Frame CRC Calculation

[1178] The Frame CRC calculation is done inside the communicationcontroller before transmission or after reception of a frame. It is partof the frame transmission process or the frame reception process,respectively.

[1179] The variable vCheckCRC_x denotes the result of the check of theconsistency of a frame and its CRC for the respective communicationchannel. The calculation may be described by the following pseudocode.

[1180] The values of the protocol constants cCrcSize, cCrcInit_x, andcCrcPolynomial depend on the frame format used, i.e. the FlexRay orbyteflight frame format. For the FlexRay frame format the value ofcCrcInit_x also depends on the channel that is used to transmit theframe:

[1181] FlexRay frame format/channel A: cCrcSize = 24; // size of theregister is 24 bits cCrcInit = (FE DC BA)_(HEX); // initializationvector of channel A cCrcPolynomial = (5D 6D CB)_(HEX); // hexadecimalrepresentation of the CRC polynomial

[1182] FlexRay frame format/channel A: cCrcSize = 24; // size of theregister is 24 bits cCrcInit = (AB CD EF)_(HEX); // initializationvector of channel B cCrcPolynomial = (5D 6D CB)_(HEX); // hexadecimalrepresentation of the CRC polynomial

[1183] byteflight frame format: cCrcSize = 15; // size of the registeris 15 bits cCrcInit = 0_(HEX); // initialization vector cCrcPolynomial =(45 99)_(HEX); // hexadecimal representation of the CRC polynomial

[1184] Short Description: Initialize the CRC shift register with theappropriate initialization value. As long as bits (vNextBit_x) from theheader or payload segment of the frame are available the while-loop isexecuted. The number of bits available in the payload segment is derivedfrom the payload length field. The bits (Transmitters use the bitsequence that will be fed into the coding algorithm, including anycontroller generated padding bits. Receivers use the decoded sequence asreceived from the decoding algorithm (i.e., after the removal of anycoding sequences (e.g. Byte Start Sequences, Frame Start Sequences,etc.)).) of the header and payload segments are fed into the CRCregister by using the variable vNextBit_x, bit by bit, in network order,e.g., for the FlexRay frame format the first bit used as vNextBit_x isthe Reserved Bit field, and the last bit used is the least significantbit of the last byte of the Payload Segment.

[1185] Procedure 1: Frame CRC Calculation Procedure 1: Frame CRCCalculation // Initialize the CRC register vCrcReg_x(cCrcSize − 1 : 0) =cCrcInit_x; while(vNextBit_x)   // determine if the CRC polynomial hasto be applied by taking   // the exclusive OR of the most significantbit of the CRC   // register and the next bit to be fed into theregister   vCrcNext_x = vNextBit_x EXOR vCrcReg_x(cCrcSize − 1);   //Shift the CRC register left by one bit   vCrcReg_x (cCrcSize − 1 : 1) =vCrcReg_x(cCRCSize − 2 : 0);   vCrcReg_x(0) = 0;   // Apply the CRCpolynomial if necessary   if vCrcNext_x     vCrcReg_x(cCrcSize − 1 : 0)= (vCrcReg_x(cCrcSize − 1 : 0)     EXOR     cCrcPolynomial;   end; //end if end; // end while loop

[1186] The following comparison is only done in the receiver. // comparefFrameCRC_x (frame CRC received on channel x) with CRC // registercontent if (vCrcReg_x == fFrameCRC_x)   vCheckCRC_x = “T”; else  vCheckCRC_x = “F”; end;

[1187] Header CRC Calculation

[1188] Among its other uses, the Header CRC field of a FlexRay frame isintended to provide protection against improper modification of the SyncBit field by a faulty communication controller (CC). The CC that isresponsible for transmitting a particular frame shall not compute theHeader CRC field for that frame. Rather, the CC shall be configured withthe appropriate Header CRC for a given frame by the host. This makes itunlikely that a fault in the CC that causes the value of a Sync Bit tochange would result in a frame that is accepted by other nodes in thenetwork because the CRC would not match. Removing the capability of thetransmitter to generate the CRC minimizes the possibility that a messagethat results from a CC fault would have a proper header CRC.

[1189] The CC that is responsible for the reception of a frame shallperform the CRC computations required to check the correctness of theHeader CRC field relative to the other information that is received inthe frame.

[1190] The variable vCheckHeaderCRC_x denotes the result of the checkfor the respective communication channel. The check may be described bythe following pseudocode.

[1191] The value of the protocol constants cHCrcSize, cHCrcInit, andcHCrcPolynomial are defined as follows: FlexRay header CRC calculation:cHCrcSize = 11; // size of the register is 11 bits cHCrcInit: =(1A)_(HEX) ; // initialization vector of Header CRC for both channelscHCrcPolynomial: = (3 85)_(HEX) ; // hexadecimal representation of theHeader CRC polynomial

[1192] Short description: Initialize the CRC shift register with theappropriate initialization value. As long as bits (vHNextBit_x) from theSync Bit, Frame ID and Payload Length fields of the frame are availablethe while-loop is executed. The number of bits available is fixed (at20) by to the frame format definition. The bits of the indicated fieldsare fed into the CRC register by using the variable vHNextBit_x, bit bybit, in network order, i.e., the Sync Bit followed by the mostsignificant bit of the Frame ID field followed by subsequent bits of theFrame ID, followed by the most significant bit of the Payload Lengthfield, and followed by subsequent bits of the Payload Length field.Transmitters use the bit sequence that will be fed into the codingalgorithm. Receivers use the decoded sequence as received from thedecoding algorithm (i.e., after the removal of any coding sequences,etc.).

[1193] The same procedure is used as described in Procedure 1 exceptstarting with:

[1194] vNextBit_x=vHNextBit_x;

[1195] cCrcSize=cHCrcSize;

[1196] cCrcInit=cHCrcInit;

[1197] cCrcPolynomial=cHCrcPolynomial;

[1198] The following comparison is only done in the receiver: if(vCrcReg_x == fHeaderCRC_x) // compare fHeaderCRC_x (Header CRC receivedon   vCheckHeaderCRC_x = “T”; // channel x) with Header CRC registercontent else   vCheckHeaderCRC_x = “F”; end;

[1199] The following covers the frame processing, and in particularframe reception procedure of the FlexRay protocol.

[1200] Overview

[1201] The protocol engine related frame processing consists of threesteps: The first step is called frame decoding. In this step framedecoding takes place. Frame decoding shall occur according to thedecoding rules specified above. The next step is called the framereception. In this step the syntactical correctness of the frame isassured. The last step is called frame acceptance. In this step theprotocol specific data that is contained in the header of each framesuch as the cycle count is checked against reference values.

[1202] Frame Reception

[1203] Frame reception specifies how the syntactical correctness of aframe is established.

[1204] Syntactical Correctness

[1205] In general a frame is considered syntactically correct if nocoding violations are detected during the reception of the frame, theheader CRC is valid, the frame CRC is valid, and the number of bytesreceived corresponds to the frame length that is contained in the frameheader.

[1206] Thus a frame shall be considered as syntactically correct whenall of the following conditions are met:

[1207] 1. Beginning with the start of the reception the five frameheader bytes are received without a coding error. The violation of thiscondition is considered to be a header-coding error(S_HeaderCodingError).

[1208] 2. The header CRC verification according to the CRC calculationprocedure returned with the result ‘valid’. The violation of thiscondition is considered to be an invalid-header-CRC error(S_InvalidHeaderCRCError).

[1209] 3. The remaining (2*fPayloadLength+3) bytes of the frame arereceived without a coding error using the fPayloadLength value extractedfrom the header of the frame. The violation of this condition isconsidered to be a frame-coding error (S_FrameCodingError).

[1210] 4. The frame CRC verification according to the CRC calculationprocedure returned with the result ‘valid’. The violation of thiscondition is considered to be an invalid-frame-CRC error(S_InvalidFrameCRCError).

[1211] 5. The frame end is reached without a coding error. The violationof this condition is considered to be a frame-coding error(S_FrameCodingError).

[1212] 6. The node does not initiate an own transmission while receptionis ongoing on the same channel. The violation of this condition isconsidered to be a transmission-conflict error(S_TransmissionConflictError).

[1213] The error-free reception of five frame header bytes, i.e.condition 1 of a syntactically correct frame is met, is considered to bea successful-header reception (S_SuccessfulHeaderReception).

[1214] A syntactically correct frame is considered to be a correct frame(S_CorrectFrame).

[1215] Frame Reception State Diagram

[1216]FIG. 36 shows the frame reception state diagram. The transitionsare summarized in Table 8. TABLE 8 Frame Reception State TransitionsAction Transition Direction taken on from to Condition for TransitionTransition FR_Idle FR_Active Transition of the channel state fromchannel idle to channel active FR_Active FR_Idle Transition of thechannel state from channel active to channel idle. In this case asyntactically correct frame was received. FR_Active FR_Abortheader-coding error detected OR invalid-header-CRC error detected ORframe-coding error detected OR invalid-frame-CRC error detected FR_AbortFR_Idle Transition of the channel state from channel active to channelidle FR_Soft FR_Idle Soft reset released Reset AND channel is in thechannel idle state All states FR_Soft Soft reset initiated Reset

[1217] FR_Idle State

[1218] The reception state machine shall remain in the FR_Idle state aslong as the channel is idle. In this state the node waits for the startof a reception, which occurs once the channel becomes active. The startof a reception shall cause a transition to the FR_Active state.

[1219] FR_Active State

[1220] Frame reception occurs in the FR_Active state. Hereby thesyntactical correctness of a frame shall be established. The occurrenceof a S_HeaderCodingError, S_InvalidHeaderCRCError, S_FrameCodingError,S_InvalidFrameCRCError shall cause a transition to the FR_Abort state.

[1221] The detection of idle at the end of a syntactically correct frameshall cause a transition to the FR_Idle state.

[1222] FR_Abort State

[1223] The reception state machine shall remain in the FR_Abort stateuntil the channel idle state is reached on the respective channel. Oncethe channel idle state is reached the reception state shall change toFR_Ready.

[1224] FR_SoftReset State

[1225] The reception state machine shall remain in the FR_SoftResetstate as long as the communication controller is in the CC_SoftResetstate and the respective communication channel is not in the idle state.

[1226] Frame Acceptance

[1227] Frame acceptance differs depending on the current protocol phase.Whether a frame is accepted in a specific phase or not depends on theoutcome of a number of checks.

[1228] FlexRay distinguishes between the startup acceptance criteria,the static segment acceptance criteria and the dynamic segmentacceptance criteria.

[1229] Startup Acceptance Criteria

[1230] The startup acceptance criteria are applied when the node is inthe integration path of the startup phase.

[1231] Thus a frame shall be considered compliant with the startupacceptance criteria when all of the following conditions are met thatare applied to a correct frame:

[1232] 1. The frame ID included in the header of the frame is not largerthan the number of the last static slot gNumberOfStaticSlots.

[1233] 2. The sync bit is set.

[1234] 3. The payload length included in the header of the frame isequal to the globally configured value of the payload length of a staticframe held in gPayloadLengthStatic. The violation of this constraint isconsidered to be a payload-length-static error(S_PayloadLengthStaticError).

[1235] A frame that complies with the startup acceptance criteria isconsidered to be a valid-startup frame (S_ValidStartupFrame).

[1236] If the cycle count value included in the header of avalid-startup frame is even then the frame is considered to be avalid-even-startup frame (S_ValidEvenStartupFrame).

[1237] If the cycle count value included in the header of avalid-startup frame is odd then the frame is considered to be avalid-odd-startup frame (S_ValidOddStartupFrame).

[1238] Static Segment Acceptance Criteria

[1239] The static segment acceptance criteria are applied when the nodeis operating in the static segment prior to having the schedule inplace.

[1240] A frame shall be considered compliant with the static segmentacceptance criteria when all of the following conditions are met thatare applied to a correct frame:

[1241] 1. The payload length included in the header of the frame isequal to the globally configured value of the payload length of a staticframe held in gPayloadLengthStatic. The violation of this constraint isconsidered to be a payload-length-static error(S_PayloadLengthStaticError).

[1242] 2. The frame ID included in the header of the frame is equal tothe value of the slot counter vSlotCounter[ch] both at the start of theframe as well as at the end of the frame. The violation of thisconstraint is considered to be a frame-ID error (S_FrameIDError). FIG.37 illustrates this constraint.

[1243] 3. The cycle count included in the header of the frame is equalto the value of the cycle counter vCycle both at the start of the frameas well as at the end of the frame. The violation of this constraint isconsidered to be a cycle-count error (S_CycleCountError).

[1244] A frame that complies with the static segment acceptance criteriais considered to be a valid-static frame (S_ValidStaticFrame).

[1245] Dynamic Segment Acceptance Criteria

[1246] The dynamic segment acceptance criteria are applied when the nodeis operating in the dynamic segment.

[1247] A frame shall be considered compliant with the dynamic segmentacceptance criteria when all of the following conditions are met thatare applied to a correct frame:

[1248] 1. The frame ID included in the header of the frame is equal tothe value of the slot counter vSlotCounter[ch] at the start of theframe. The violation of this constraint is called a frame-ID error(S_FrameIDError). FIG. 38 illustrates this requirement.

[1249] 2. The cycle count included in the header of the frame is equalto the value of the cycle counter vCycle both at the start of the frameas well as at the end of the frame. The violation of this constraint isconsidered to be a cycle-count error (S_CycleCountError).

[1250] 3. The sync bit included in the header is set to ‘0’. Theviolation of this constraint is considered to be a sync-bit error(S_SyncBitError).

[1251] A frame that complies with the dynamic segment acceptancecriteria is considered to be a valid-dynamic frame(S_ValidDynamicFrame).

[1252] Clock Synchronization

[1253] Introduction

[1254] In a distributed communication system every node has its ownclock. Due to temperature fluctuations, voltage fluctuations, andproduction tolerances of the timing source (e.g. oscillator), theinternal time base diverges between the nodes after a short time, evenif all internal time bases of the nodes are started concurrently.

[1255] A basic assumption for a time-triggered system is that every nodein the cluster has practically the same view of time and this commonglobal view of time is used as the local time base for each node. Inthis context, “the same” means that the differences between any twonodes' views of the global time are bounded to a specified tolerancelimit and that the maximum value for this difference is known as theprecision.

[1256] The primary task of the clock synchronization function is toensure the time differences between the nodes of a cluster stay withinthe precision.

[1257] Two types of time differences between nodes can be distinguished:

[1258] Offset (phase) differences and

[1259] Rate (frequency) differences

[1260] To synchronize the local time base of different nodes, methodsare known for offset correction and for rate correction. In FlexRay acombination of both methods is used.

[1261] Clock Synchronization Modes

[1262] FlexRay supports both time-triggered and event-triggered clocksynchronization. This chapter describes the time-triggered modes.Further on it is described how the event-triggered mode works. Theappropriate clock synchronization mode should be chosen based upon therequirements of the applications to be supported by the cluster. Thecluster must then be configured accordingly. Table 9 illustrates thecluster configuration conditions for the various clock synchronizationmodes.

[1263] FlexRay supports two modes for performing time-triggered clocksynchronization. TABLE 9 Configuration Rules for Various ClockSynchronization Modes Operation Mode: FlexRay byteflight Multi-Master,Single-Master, Single-Master, Synchronization distributed clock withrate without rate mode: sync correction correction Number of [2 . . .16] 1 1 Sync Nodes: Number of ≧ number of sync ≧1 0 Static Slots:masters Number of = number of sync 1 0 Sync Frames: nodes Number of atleast one exactly one exactly one Cold Starters

[1264] Single-Master Clock Synchronization

[1265] With Single Master Clock Synchronization, each node individuallysynchronizes itself to the cluster by observing the timing oftransmitted sync frames from the clock sync master.

[1266] Single-master clock synchronization shall be performed if thestatic segment is configured with only one static slot(gNumberOfStaticSlots=1).

[1267] The node that owns the static slot must transmit sync frames inthis slot in every cycle. This node is the only node in the cluster thattransmits sync frames. It is the clock synchronization master and theremaining nodes are slaves.

[1268] All other nodes shall receive the sync frames and perform theclock synchronization algorithm as if the node were in a cluster usingdistributed clock synchronization (see below).

[1269] The behavior in case of a fault is described further on. Theconditions to signal an fault are different for the master and for thesalves and they are listed in Table 10 below.

[1270] Distributed Clock Synchronization

[1271] With Distributed Clock Synchronization, each node individuallysynchronizes itself to the cluster by observing the timing oftransmitted sync frames from other nodes. A fault-tolerant algorithm isused.

[1272] Distributed clock synchronization shall only be performed if thecluster is configured with a static segment (gNumberOfStaticSlots>1).

[1273] At least two nodes shall transmit sync frames.

[1274] The time representation and the principles of the (distributed)clock synchronization are described in detail below.

[1275] Differences Between Distributed and Single Master ClockSynchronization

[1276] In both modes (single-master and distributed clocksynchronization) the same clock synchronization algorithm is used.Differences between both modes exist

[1277] in the configuration (see Table 6),

[1278] in the startup (see further on) and

[1279] signaling of a fault to the error management.

[1280] The following tables list the relevant differences for the errorsignaling. TABLE 10 Differences in the Error Signaling BetweenDistributed and Single Master Clock Synchronization Multi-Master,Single-Master, with rate Synchronization mode: distributed clock synccorrection Missing Rate Correction master no sync frame pair in an neverSignal (MRCS) set to 1 slave even/odd double cycle no sync frame pair inan even/odd double cycle Missing Offset Correction master no sync framein odd cycle never Signal (MOCS) set to 1 slave no sync frame in oddcycle Clock Correction Limit master calculated offset or rate neverReached (CCLR) set to 1 slave correction value outside calculated offsetor rate the specified limits correction value outside the specifiedlimits

[1281] Time Representation

[1282] Local Time Representation

[1283] Internally, nodes can time their behavior with microtickresolution. Microticks are time units derived from the (external)oscillator clock tick, optionally using a prescaler. Microticks arecontroller-specific units. They may have different durations indifferent controllers. The precision of a node's local time differencemeasurements is a microtick.

[1284] Local controller time is based on cluster-wide synchronized cycleand macrotick values provided by the distributed clock synchronizationmechanism. Finer resolution local timing shall be done using thenode-specific microtick. The value vMacrotick.vMicrotick represents thecontroller local view of time within a given cycle.

[1285] vCycle is the (controller-local) cycle number and is increasedonce every communication round. At any given time all nodes should havethe same value for vCycle (except due to imperfect synchronization atcycle boundaries).

[1286] Cycle counter values (vcycle) range from zero (00 0000)₂ tocCycleMax (11 1111)₂.

[1287] When cCycleMax is reached, the cycle counter vCycle shall bereset to zero (00 0000)₂ in the next communication cycle (see Procedure3)

[1288] vMacrotick is the current value of the (controller-local)macrotick counter.

[1289] gMacroPerCycle defines the (integer) number of macroticks percycle (see FIG. 39).

[1290] Within tolerances, the duration of a macrotick is constantthroughout the cluster on synchronized nodes.

[1291] Every node in the cluster has its own local view of the globaltime. The local view of global time is represented by a vectorconsisting of the current cycle number (vCycle) and the currentmacrotick value (vMacrotick). The value vCycle.vMacrotick is the(controller-local) view of the global time in the cluster. It is visibleto the application.

[1292] pMicroPerMacroNom is the (controller-specific) nominal number ofmicroticks per macrotick.

[1293] vRateCorrection is the (integer) number of microticks that shallbe added to the pMicroPerMacroNom*gMacroPerCycle microticks in thecurrent cycle to produce the correct cycle length. vRateCorrection maybe negative. The value of vRateCorrection is determined by the clocksynchronization algorithm. It may only change once (usually at thebeginning) per cycle.

[1294] pMicroOverheadPerCycleNom is the initial configuration value ofvRateCorrection.

[1295] The duration of the current controller-local macrotick is aninteger multiple of controller-local microticks and is represented byvMicroPerMacroCorr. The value of vMicroPerMacroCorr within onecontroller may change from macrotick to macrotick.

[1296] In any given cycle, vRateCorrection microticks shall bedistributed across the gMacroPerCycle macroticks comprising the cycle inorder to adjust the cycle length to the proper duration. Consequently,vMicroPerMacroCorr does not remain constant. In general, vRateCorrectionis nonzero and is not a multiple of gMacroPerCycle. Consequently, theprocess of distributing the vRateCorrection microticks across thegMacroPerCycle macroticks conceptually introduces fractional macroticks.

[1297] At the beginning of the first communication cycle the “local timevariables” shall be initialized (see Procedure 2).

[1298] Procedure 2: Initialization of a Node Procedure 2: Initializationof a Node [vCycle, vMacrotick, vMicrotick, vMicroPerMacroCorr] =NodeInitialization( ) //  vCycle = 0; // reset cycle counter  vMacrotick= 0; // reset macrotick counter  vMicrotick = 0; // reset microtickcounter  vMicroPerMacroCorr = pMicroPerMacroNom; // set the predefined vRateCorrection = pMicroOverheadPerCycleNom; // value for // microticksper macrotick

[1299] Procedure 3: Incrementing the Cycle Count Procedure 3:Incrementing the Cycle Count [vMacrotick, vCycle] =ChangeOfCycleCount(vMacrotick, vCycle)   if vMacrotick ≧ gMacroPerCycle   //     vCycle++; // increment cycle counter     vMacrotick = 0; //reset macrotick counter     if vCycle > cCycleMax //       vCycle = 0;// reset cycle counter     end; //   end; //

[1300] The host shall be able to read the cycle counter and themacrotick counter. The update of the cycle counter shall be atomic withthe macrotick counter. An atomic action is an action where nointerruptions is possible.

[1301] The duration of a Macrotick shall be an integer number of aMicroticks, however, the number of microticks per macrotick may differfrom macrotick to macrotick. Before the first correction value iscalculated the clock synchronization algorithm shall work with nominalmacroticks, usingvMicroPerMacroCorr=pMicroPerMacroNom+pMicroOverheadPerCycleNom (seeProcedure 4).

[1302] The number of microticks per nominal macrotick may differ betweennodes and depends on the oscillator frequency and the prescaler.

[1303] The duration of one cycle shall be an integer number of amacroticks. The number of macroticks per cycle is intended to beidentical in all nodes in a cluster (see FIG. 39).

[1304] Procedure 4: Incrementing the Macrotick Counter Procedure 4:Incrementing the Macrotick Counter [vMicrotick, vMacrotick] =IncrementMacrotickCounter (vMicroPerMacroCorr, vMicrotick, vMacrotick)// uses microtick pulses   while(1) //     wait(Microtick_duration); //every microtick increase     vMicrotick++; // microtick counter by one    if vMicrotick ≧ vMicroPerMacroCorr //       vMicrotick = 0; // Resetmicrotick counter       vMacrotick++; // Increment macrotick counter  end; // end; //

[1305] Procedure 5: Uniform Distribution of Microticks

[1306] The following example only addresses the distribution ofmicroticks over the macroticks comprising the cycle. The more completesolution must also deal with offset corrections and is described inProcedure 10. InitRateStartOfCycle(vRateCorrection) // execute atbeginning of cycle // sufficient every second cycle vMicroPerCycle =gMacroPerCycle * pMicroPerMacroNom // total number of microticks +vRateCorrection; // for this cycle vRatioMicroMacro =vMicroPerCycle/gMacroPerCycle;   // real division, not integervIntegerRatio = Int[vRatioMicroMacro]; // Integer part of ratio vRest =vRatioMicroMacro − vIntegerRatio; // Fractional part of ratiovRemainingSumOfFractionalparts = vRest; // Initialization valuesvDeltaCorrect=0; // for variables // DistributeMicr OverMacr Rate //while(1) // vMicroPerMacroRateCorr = vIntegerRatio + vDeltaCorrect; //Calculate new MicroPerMacro vRemainingSumOfFractionalParts =vRemainingSumOfFractionalParts + vRest; // fractional history term ifvRemainingSumOfFractionalParts ≧ 1 // If sum of fractional vDeltaCorrect= 1;     // parts becomes greater vRemainingSumOfFractionalParts =vRemainingSumOfFractionalParts −1; // increase macrotick length by 1else // vDeltaCorrect = 0 // vMicroPerMacroCorr =vMicroPerMacroRateCorr;     // if no offset correction present end; //[vMicrotick, vMacrotick] = IncrementMacrotickCounter(vMicroPerMacroCorr,vMicrotick, vMacrotick)

[1307] Notes on the above Procedure:

[1308] Offset correction has an additional influence. Therefore there isa difference between the variables vMicroPerMacroCorr andvMicroPerMacroRateCorr.

[1309] Since there is no real division available in hardware, theimplementation will not precisely replicate the above procedure. Mostlikely the variable vMicroPerMacroCorr will not be explicitly calculatedin hardware.

[1310] As is typically true with pseudocode, the above procedureprovides insight into the behavior of the mechanism, but not itsimplementation.

[1311] Global Time Representation

[1312] In a FlexRay node activities, including communication, shall bebased on the concept global time, even though each individual nodemaintains its own view of it. It is the clock synchronism mechanism thatdifferentiates the FlexRay cluster from other node collections withindependent clock mechanisms. The global time is a vector of two values,the cycle (cycle counter) and the macrotick counter (cycle time).

[1313] General Concepts

[1314] The node (or nodes in the case of a startup with collisions) thattransmits the first CAS during startup, shall initialize the cyclecounter and the cycle time to zero at the beginning of the communicationcycle following the transmission of the CAS. See above for details.

[1315] The duration of a static slot gdSlot, a communication cyclegdCycle, and the idle time at the end of a communication cyclegdNetworkIdle shall be all expressed as an integer number of macroticks.

[1316] Each node with pChannels==gChannels that is configured to send inthe static segment of the communication cycle may send at most one frameper communication cycle with the sync bit set.

[1317] The sync bit may only be set in frames that are transmitted onall channels (gChannels—one or two channel configuration).

[1318] Not all nodes that are configured to send in the static segmentof the communication cycle need to send frames with the sync field set.

[1319] The communication controller shall count all correctly receivedframes where the sync bit is set. The counter is reset at the start ofthe communication cycle. This number of the correct received sync framesof the previous communication cycle is presented by vValidSyncFrameCountand shall be accessible to the host.

[1320] If a controller receives more than gSyncNodeMax the firstgSyncNodeMax shall be used for clock synchronization.

[1321] The calculation of the correction values shall take place everysecond communication cycle during the network idle time (NIT).

[1322] The clock synchronization can be realized with four processescalled measurement, calculation, offset correction, and rate correction.The offset correction, measurement, and calculation processes areperformed sequentially. Rate correction is performed in parallel to theother three. FIG. 40 shows the relative execution timing of these fourprocesses.

[1323]FIG. 41 illustrates the internal structure of the clocksynchronization mechanism in more in detail. The blocks in theillustration correspond to the pseudocode procedures in this chapter.The black boxes describe the tasks performed and the adjacent blue textgives the corresponding procedure name. Note: For boxes with nocorresponding procedure name (no blue text) there is no procedure thatcorresponds precisely to the task. Pseudocode fragments for these tasksare interspersed with the text.

[1324] Time Measurement

[1325] Every node shall measure and store, by channel, the timedifferences vMeasureChx (in microticks) between the expected and theobserved arrival time of all sync frames received during the staticsegment. Difference observations are marked as invalid until the frameis received completely and has passed the required validity checks.

[1326] The expected arrival time of a frame is the Minislot action pointof the corresponding slot. It is represented byvExpectedArrivalTime=vMacrotick_(Expected).vMicrotick_(Expected), wherevMacrotick_(Expected) and vMicrotick_(Expected) are the macrotick andmicrotick timer values at the instant of the minislot action point.

[1327] The observed arrival time of a frame is the instant of receptionof the 1/0-edge in the middle of the first Byte Start Sequence after theFrame Start Sequence. It is represented byvObservedArrivalTimeChx=vMacrotick_(Observed). vMicrotick_(Observed),where vMacrotickObserved and vMicrotick_(Observed) are the macrotick andmicrotick timer values at the instant of reception of this edge.

[1328] The time difference between expected and observed arrival time iscalculated as follow:

[1329]vMeasureChx=vObservedArrivalTimeChx−vExpectedArrivalTime−gdFrameStartSequence−1gdBit−pDelayCompensationChx

[1330] The global parameters gdframeStartSequence and gdBit arespecified in units of bit times that can differ between nodes if clocksources with different frequencies are used. Internally these parametersare represented in microticks.

[1331] The sync frame validity checks used during startup andreintegration and during normal operation are described in Section“Frame Processing”.

[1332] The time difference measurement shall be done for all channelspChannels.

[1333] If there are time difference measurements from more than onechannel for a given sync frame, the smallest value shall be taken.

[1334] If only one valid frame is received within a given static slot,this single observation shall be used for the Time DifferenceMeasurement.

[1335] Every node has to be able to store measurement values with theirassociated Frame IDs for gSyncNodeMax sync nodes. A countervValidSyncFrameCount is increased when a valid sync frame is received.If a node receives more than gSyncNodeMax sync frames in onecommunication cycle it is communication to the Error Management but usesthe first gSyncNodeMax observations for the calculation of the rate anddrift correct values. The counter vValidSyncFrameCount is set to zerowhen a new communication cycle starts.

[1336] Note, the Frame Identifiers of sync frames expected to bereceived are not stored in the configuration of a node.

[1337] Individual delay compensation values pDelayCompensationChA andpDelayCompensationChB can be configured for each channel. Thecompensation values should be set to the minimum propagation delay timeexperienced by any node in the cluster.

[1338] Procedure 6: Measurement

[1339] The following procedure shall be executed during normal operationfollowing the reception of each frame in the static segment.[vsMeasureOddList, vsMeasureEvenList] = Measurement(vCycle,vsMeasureOddList, vsMeasureEvenList);   if fSyncBit == 1;       // syncbit in message set     if messageChA == valid     // message is valid      vMeasureChA = vObservedArrivalTimeChA −  // measurement on channelA       vExpectedArrivalTimechA − gdFrameStartSequence −  // minuscompensation value       1 gdBit − pDelayCompensationChA;   //     else          //       vMeasureChA = ‘invalid’;     // mark message asinvalid     end;               //     if messageChB == valid       //message is valid       vMeasureChB = vObservedArrivalTimeChB −  //measurement on channel B       vExpectedArrivalTimeChB −gdFrameStartSequence − // minus compensation value       1 gdBit −pDelayCompensationChB;   //     else             //       vMeasureChB =‘invalid’;     // mark message as invalid     end;             //     ifvMeasureChA == ‘invalid’    //       if vMeasureChB == ‘invalid’    //        vMeasureMin = ‘invalid’;     //       else     //        vMeasureMin = vMeasureChB;     //       end;             //    else             //       if vMeasureChB == ‘invalid’  //    vMeasureMin = vMeasureChA;     // else //         vMeasureMin =MIN(vMeasureChA, vMeasureChB); // save the minimum value of // both   ifvMeasureMin ˜= ‘invalid’    // if MODULO(vCycle, 2) == 1 // separate inodd and even // cycles vsMeasureOddList = [vsMeasureOddList; [fFrameID,vMeasureMin]]; // to list else // measured value vsMeasureEvenList =[vsMeasureEvenList; [fFrameID, vMeasureMin]]; end; // measured valueend; // end; //

[1340] Correction Term Calculation

[1341] Fault-Tolerant Midpoint Algorithm

[1342] The technique used for the calculation of the correction terms isa fault-tolerant midpoint algorithm (FTA/FTM). The algorithm works asfollows (see FIG. 43 and Procedure 7):

[1343] 1. The measured values are sorted and the n largest and the nsmallest values are discarded.

[1344] 2. The value of n is adapted dynamically to the number of valuesin the sorted list. TABLE 11 FTA/FTM Term Deletion as a Function of ListSize Number of Values n 1-2 0 3-7 1  8-16 2

[1345] 3. The largest and the smallest of the remaining values areaveraged for the calculation of the midpoint value. The resulting valueis assumed to represent the node's deviation from the global time baseand serves as the correction term (see FIG. 43). Procedure 7: FTM/FTAAlgorithm function: vCorrectValue = Midterm(list); n = LENGTH(list); //number of elements in the list if n > 0 // list = SORT(list); // orderlist by values if n < 3 //k=0 vCorrectValue = (list(1) + list(n)) / 2; // choose largest and smallest value else // if n < 8 // k=1vCorrectValue = (list(2) + list(n−1)) / 2;  // choose second largest andsecond else // smallest value // k=2 vCorrectValue = (list(3) +list(n−2)) / 2;  // choose third largest and third smallest value end;// end; // else // vCorrectValue = 0; // end; //

[1346] If the list contains only one value this value is used for clocksynchronization.

[1347] Calculation of the Offset Correction Value

[1348] 1. The Offset Correction Value vOffsetCorrection is a (signed)integer indicating by how many microticks the node should shift itsstart of the cycle.

[1349] 2. Offset calculation shall be finished before start of cycle,and it may only start after end of last synchronization slot.

[1350] 3. The node's own offset value (most likely zero, depending onthe measurement principle used) shall be included if it transmits a syncFrame.

[1351] 4. The calculation of the offset correction value shall be doneevery communication cycle, but the offset correction shall be only donein the odd numbered cycles. In even numbered cycles no offset correctionshall be done.

[1352] 5. The calculated offset correction value shall be checkedagainst the limit values every cycle. If the calculated offsetcorrection value outside of the allowed range a warning shall be raisedto the host (further behavior is specified in the following text).

[1353] 6. If the node transmits sync frames, its own offset time shallbe included by adding one instance of the value zero (depending onmeasurement method) to the list of measured time difference values fromthe last cycle.

[1354] 7. The offset correction value shall be determined by applyingthe FTA/FTM to the list of measured time differences. Procedure 8:Offset Correction Value Calculation vOffsetCorrection = OffsetCalculatin(vsMeasureOddList) list = []; // initialize list list =vsMeasureOddList(:,2)  // take all measure values without // frame ID ina list (:,2) = all // lines, second colum) if LENGTH(vsMeasureOddList)== 0 AND SingleMaster == 0 // if no sync frame in the odd cycle MOCS =1; // was received set the Missing Offset else // Correction Signal to 1for the Error MOCS = 0; // Signaling otherwise to 0 end; // // ifsync_master == 1  AND ErrorState == ‘green’ AND OperationState ==(‘ColdStartICW’ OR ‘ColdStartVCW’ OR ‘NormalOperation’) // if node is async master (means the // node transmits sync messages) list = [list,0]; // add one zero value to the list end; // if LENGTH(list) > 0 // atleast one value vOffsetCorrection = Midterm(list); // calculate offsetcorrection term else // vOffsetCorrection = 0; // no offset correctionend; //

[1355] Calculation of the Rate Correction Value

[1356] 1. The calculation of the rate correction value shall be doneafter every second communication cycle, in the odd numbered cycles (seeFIG. 44).

[1357] 2. The rate correction value shall be determined by comparing thecorresponding measured time differences from two successive cycles.Specifically, a new list of values shall be created whose elements arecalculated by taking the differences between the most recent cycle'smeasured time difference and the previous cycle's measured timedifference. Only time values corresponding to frames passing thevalidity checks on both channels shall be used.

[1358] 3. If the node transmits sync frames its own rate correctioninfluence shall be considered by adding an instance of the value zero tothe list of calculated time difference.

[1359] 4. In the next step the FTA/FTM algorithm described above shallbe applied to the list of time difference values built in the previoustwo steps.

[1360] 5. After calculating the correction term, the stored measurementvalues shall be deleted so that the next calculation starts with a newset of values.

[1361] 6. The ideal new rate correction value is the sum of the valuecalculated in the previous step and the current correction value.

[1362] 7. To prevent cluster drift that can result from an accumulationof rounding errors the rate correction term actually used is not theideal rate correction, but a slight modification of this term towardsthe configuration value. The modification term is a positive integerpClusterDriftDamping that is part of node's static configuration.Procedure 9: Rate Correction Value Calculation  vRateCorrection =RateCalculation(vsMeasureOddList, vsMeasureEvenList, vCycle, vRateCorrection) if MODULO(vCycle, 2) == 1 // if cycle number is odd for i=1 to LENGTH(vsMeasureOddList) // for all elements of list1   forj=1 to LENGTH(vsMeasureEvenList) // and list2    ifvsMeasureOddList(i,1) = vsMeasureEvenList(j,1) // if same frameID    diff = vsMeasureOddList(i, 2) − vsMeasureEvenList(j, 2); // builddifference     vsMeasureDiffList = [vsMeasureDiffList, diff]; // andsave in difference list    end; //   end; //  end; // //  ifLENGTH(vsMeasureDiffList) == 0 AND SingleMaster == 0 // if no sync framepair was received MRCS = 1; // set the Missing Rate Correction  else //Signal to 1 for the Error Signaling MRCS = 0; // otherwise to 0  end; ////  if sync_master == 1 AND ErrorState == ‘green’ AND  OperationState ==(‘ColdStartICW’ OR ‘ColdStartVCW’ OR ‘NormalOperation’) // if node is async master vsMeasureDiffList = [vsMeasureDiffList, 0]; // add oneinstance of zero to list end; // // number of sync frames pairs usedvValidSyncFramesCount = LENGTH(vsMeasureDiffList) // for rate correctioncalculation is // supported to the host if LENGTH(vsMeasureDiffList) > 0// at least one value in the list vIdealRateCorrection =Midterm(vsMeasureDiffList) + // calculate the rate correction termvRateCorrection; // plus old correction value if vIdealRateCorrection ≧MicroOverheadPerCycleNom + pClusterDriftDamping vRateCorrection =vIdealRateCorrection − pClusterDriftDamping; // elseifvIdealRateCorrection ≦ pMicroOverheadPerCycleNom − pClusterDriftDampingvRateCorrection = vIdealRateCorrection + pClusterDriftDamping; // else// vRateCorrection = vIdealRateCorrection; // no damping end; // else //no valid sync frames vRateCorrection = vRateCorrection;  // no new ratecorrection value, end; // take old value; no damping; end; // warning!

[1363] pClusterDriftDamping should be configured in a way that thedamping value in all controllers has nearly the same duration. Aconfiguration value is used to adapt in case of different Microtickduration in different controllers.

[1364] After calculation of the rate correction value the memory for themeasurement values is cleared and marked empty. It should be clear thatthe offset correction value is calculated before the memory is cleared.

[1365] External Clock Synchronization (Optional)

[1366] During normal operation, two independent clusters can driftsignificantly (e.g., by the damping factor of each cluster). Ifsynchronous operation is desired across the two clusters, externalsynchronization is necessary; even though the nodes within each clusterare synchronized. This can be accomplished with the synchronousapplication of host-deduced rate and offset correction terms to bothclusters.

[1367] External clock synchronization is an optional feature of aFlexRay controller that means is not required for any controller to meetprotocol conformance. However, if this feature is used in a cluster allnodes in this cluster should support this feature in order to make ituseful.

[1368] External offset correction shall be performed in the same cyclein all nodes of a cluster; external rate correction shall be performedin the same double cycle in all nodes of a cluster.

[1369] The external correction terms (offset and rate correction terms)available to the communication controller when the network idle timestarts are the values that are used. If no values are available theexternal correction values shall be set to zero for the next doublecycle.

[1370] The external correction terms shall be checked against limits andapplied following the corresponding tasks are performed for the internalcorrection terms. This shall take place during the Network Idle Time.

[1371] Following the Network Idle Time, an aggregate rate correctionterm consisting of correction components from the internal and externalrate correction terms, shall be applied during the next twocommunication cycles.

[1372] The aggregate offset correction term, consisting of correctioncomponents from the internal and external offset correction terms, shallbe applied in the remainder of the Network Idle Time, before the nextcycle starts.

[1373] In soft reset, the initial external rate correction may beaccomplished by setting the external rate correction term by the host.

[1374] Value Limitations

[1375] Before applying them, the calculated correction values shall bechecked against pre-configured limits. These limits define two regionsthat are referred to as the “red” and “green” regions, where the colorsreflect the acceptability of the calculated value (see FIG. 45). Thegreen region is between −gRateCorrectionOut and +gRateCorrectionOut andthe red region is outside these boundaries.

[1376] If correction values are in the green region, the node is fullysynchronized. No further actions are necessary.

[1377] If one of the correction values is in the red region, the node isout of synchronization. This corresponds to an error condition.Information on the handling of this situation is specified further on inthe text.

[1378] The correction values are in the green region if:

−gRateCorrectionOut≦vRateCorrection≦+gRateCorrectionOut AND−gRateCorrectionOut≦vRateCorrection+vRateCorrectionExtern≦+gRateCorrectionOut−gOffsetCorrectionOut≦vOffsetCorrection≦+gOffsetCorrectionOut AND−gOffsetCorrectionOut≦vOffsetCorrection+vOffsetCorrectionExtern≦+gOffsetCorrectionOut

[1379] If both correction values are in the green area the correction isdone.

[1380] −gRateCorrectionOut is the lower boundary and +gRateCorrectionOutis the upper boundary of the green area for the rate correction.

[1381] −gOffsetCorrectionOut is the lower boundary and+gOffsetCorrectionOut is the upper boundary of the green area for theoffset correction.

[1382] The correction value is in the red region if−gRateCorrectionOut>vRateCorrection OR+gRateCorrectionOut<vRateCorrection OR−gRateCorrectionOut>vRateCorrection+vRateCorrectionExtern OR+gRateCorrectionOut<vRateCorrection+vRateCorrectionExtern−gOffsetCorrectionOut>vOffsetCorrection OR+gOffsetCorrectionOut<vOffsetCorrection OR−gOffsetCorrectionOut>vOffsetCorrection+vOffsetCorrectionExtern OR+gOffsetCorrectionOut<vOffsetCorrection+vOffsetCorrectionExtern

[1383] The significance of having correction values in the red regiondepends on whether the node is in the process of startup, or not. Duringnormal operation this is to be considered a fault condition. IfvRateCorrection OR vRateCorrection+vRateCorrectionExtern is outside thespecified area the error signal CCLR is set to 1. If vOffsetCorrectionOR vOffsetCorrection+vOffsetCorrectionExtern is outside the specifiedarea the error signal CCLR is set to 1, too. During startup andreintegration this condition is treated differently (see further on inthe text).

[1384] The values of gRateCorrectionOut and the gOffsetCorrectionOut areidentically specified for all nodes in the cluster. They are defined interms of macroticks or fractions of a macrotick. From these cluster-widevalues the configuration data for each node shall be calculated(measured in microticks). These values shall be included in theconfiguration interface. These calculations are summarized as follows:

pOffsetCorrectionOut=gOffsetCorrectionOut*pMicroPerMacroNom

pRateCorrectionOut=gRateCorrectionOut*pMicroPerMacroNom

[1385] Clock Correction

[1386] Once calculated, the correction terms shall be used to modify thelocal clock in a manner that synchronizes it more closely with theglobal clock. This shall be accomplished by using the correction termsto adjust the number of microticks in each macrotick.

[1387] Rate correction shall be accomplished by modifying the value ofvRateCorrection (see Procedure 9), which shall be subsequentlydistributed over the macroticks comprising the next cycle.

[1388] Offset correction shall be accomplished by modifying the value ofvOffsetCorrection (see Procedure 8), which shall be subsequentlydistributed over the macroticks comprising the current Network IdleTime.

[1389] Rate Correction

[1390] The rate correction term shall be uniformly distributed over theentire cycle (see FIG. 44). Procedure 10: Distribution of Microticksover Macroticks [vIntergerRatio, vRest, vRemainingSumOfFractionalParts,vDeltaCorrect, vOffsetRemainder] = InitStartOfCycle(vRateCorrection,vOffsetCorrection, vRateCorrectionExtern, vOffsetCorrectionExtern) //This replaces InitRateStartOfCycle // execute at the beginning of everyvMicroPerCycle = gMacroPerCycle * pMicroPerMacroNom // second cycle  +vRateCorrection + vRateCorrectionExtern; // vRatioMicroMacro =vMicroPerCycle / gMacroPerCycle; // vIntegerRatio =Int[vRatioMicroMacro]; // vRest = vRatioMicroMacro − vIntegerRatio; //value between 0 and 1 vRemainingSumOfFractionalParts = vRest; //vDeltaCorrect = 0; // vOffsetRemainder = vOffsetCorrection +vOffsetCorrectionExtern; // Additional variable [vMicroPerMacroCorr,vIntegerRatio, vDeltaCorrect, vRemainingSumOfFractionalParts, vRest,vOffsetRemainder] = DistributeMicroOverMacro(vIntegerRatio,vDeltaCorrect, vRemainingSumOfFractionalParts, vRest, vOffsetRemainder)// This replaces DistributeMicroOver // MacroRate while(1) //vMicroPerMacroRateCorr = vIntegerRatio + vDeltaCorrect; // Ratecorrection part vRemainingSumOfFractionalParts =vRemainingSumOfFractionalParts + vRest; ifvRemainingSumOfFractionalParts ≧ 1 vDeltaCorrect = 1;vRemainingSumOfFractionalparts = vRemainingSumOfFractionalParts −1; elsevDeltaCorrect = 0; end; if vMacrotick ≧ OffsetCorrectionStart ANDvMacrotick < OffsetCorrectionEnd vMicroPerMacroCorr = OffsetC rrectin(vOffsetRemainder, vMicroPerMacroRateCorr) else vMicroPerMacroCorr =vMicroPerMacroRateCorr; end; [vMicrotick, vMacrotick] =IncrementMacrotickCounter(vMicroPerMacroCorr, vMicrotick, Macrotick)end; [vMacrotick, vCycle] = ChangeOfCycleCount(vMacrotick, vCycle)

[1391] Procedure notes:

[1392] This is only an example.

[1393] As previously mentioned, it seems to be unlikely that thevariable vMicroPerMacroRateCorr can be calculated explicitly inhardware. It is more likely that the IncrementMacrotickCounter procedurewill be an intrinsic part of at least the rate part of the microtickdistribution state machine.

[1394] Offset Correction

[1395] Offset correction shall be done during the network idle time byincreasing or decreasing the size of macroticks depending on the valueof vOffsetCorrection.

[1396] It is not required that all controllers perform their offsetcorrection identically. However, they shall perform the offsetcorrection in the Network Idle Time. The offset correction should becompleted at least one macrotick before the end of the NIT and thereforebefore the communication cycle ends.

[1397] The offset correction term, vOffsetCorrection, is a signedinteger that shall be visible to the application. The maximum number ofmicroticks by that a macrotick can be increased (due to offsetcorrection and rate correction combined) shall be bounded by aconfiguration constant pMicroPerMacroMax. The offset correction term,vOffsetCorrection, shall be distributed across the first, and subsequentmacroticks to the limit allowed by pMicroPerMacroMax, until the totaloffset term is distributed.

[1398] The maximum number of microticks by that a macrotick can bedecreased (due to offset correction and rate correction combined) shallbe bounded by a configuration constant pMicroPerMacroMin. The offsetcorrection term, vOffsetCorrection, shall be distributed across thefirst, and subsequent macroticks to the limit allowed bypMicroPerMacroMin, until the total offset term is distributed.

[1399] pMicroPerMacroMax is the maximum length of a macrotick inmicroticks.

[1400] pMicroPerMacroMin is the minimum length of a macrotick inmicroticks. [vMicroPerMacroCorr] = OffsetCorrection(vOffsetCorrection,vMicroPerMacroRateCorr) if networkIdleTime == true // ifvOffsetCorrection > 0 // positive offset if vOffsetCorrection >pMicroPerMacroMax − vMicroPerMacroRateCorr; vMicroPerMacroCorr =pMicroPerMacroMax; vOffsetCorrection = vOffsetCorrection −(pMicroPerMacroMax − vMicroPerMacroRateCorr); else // vMicroPerMacroCorr= vOffsetCorrection + vMicroPerMacroRateCorr; vOffsetCorrection = 0; //end; // else // if (vMicroPerMacroRateCorr − pMicroPerMacroMin) <|vOffsetCorrection| vMicroPerMacroCorr = pMicroPerMacroMin;vOffsetCorrection = vOffsetCorrection + (vMicroPerMacroRateCorr −pMicroPerMacroMin); else vMicroPerMacroCorr = vMicroPerMacroRateCorr +vOffsetCorrection; vOffsetCorrection = 0; // end; // end; // else //vMicroPerMacroCorr = vMicroPerMacroCorr; // end; // ClockSynchronization Parameters

[1401] Clock Synchronization Parameters

[1402] The following parameters are specific to clock synchronizationRange/ Name Description Value Units vDeltaCorrect Additional microticksper macrotick μT necessary as a result of clock rate correctionvIntegerRatio The integer portion of the — corrected microtick tomacrotick ratio vRatioMicroMacro. vMicro- The integral number of μTOverhead- microticks that must be added PerCycle to (or subtracted from,if negative) the current cycle in order for the cycle to have thecorrect length. vMicro- μT PerMacro- RateCorr vOffset- Remainder vRatio-Floating-point number — Micro- representing the ratio of the Macronumber of microticks to the number of macroticks per cycle.vRatioMicroMacro = vIntegerRatio + vRest vRemaining- Floating-pointnumber used for μT SumOf- clock rate correction that Fractional-indicates the total fractional microticks Parts that have not yet beencorrected by the insertion or deletion of a microtick from a macrotick.When the absolute value exceeds 1 a microtick is added or removed. vRestFloating-point number indicating — the fractional portion ofvRatioMicroMacro.

[1403] Wakeup, Startup, and Reintegration

[1404] Introduction

[1405] This section describes the FlexRay wakeup and startup mechanisms.Before the startup can be performed, the cluster has to be awake, so thewakeup has to be completed before startup can commence.

[1406] First a simplified description of both processes is given. Theintent of these descriptions is to provide an overview of the process tofacilitate a basic understanding. The technical details areintentionally deferred to later in the chapter.

[1407] Afterwards, the wakeup is described in more detail. Two examplesare provided to give insights into the combined effort of the Hosts andcommunication controllers of the cluster in performing the wakeup.

[1408] After the wakeup section, the startup is described, first forFlexRay cluster in one of the time-triggered protocol modes, then forFlexRay cluster using the byteflight protocol mode or theevent-triggered protocol mode extension.

[1409] FlexRay Wakeup and Startup—A Functional Description

[1410] This section explains the principal workings of the FlexRaywakeup and startup procedure using high-level flow charts and textualdescription. Later in this chapter the wakeup and startup processes aredefined using state machines, giving an exact definition of thosedetails that were left intentionally out of this section.

[1411] Wakeup

[1412]FIG. 47 shows a global structure of the Wakeup. At any point intime some nodes (possibly all but one) in the FlexRay cluster may be ina power-saving mode. At least one of those nodes that are awake may wantto initiate a startup of the whole cluster. However, before a node cancommunicate with the other nodes, they must be awake, so the wakeupprocess must precede the startup process.

[1413] The protocol defines a wakeup pattern that, if sent over the buswithout error, causes all other nodes to wake up. The communicationcontroller provides the Host a procedure to transmit this pattern on itschannels. To limit the dangers of disturbing ongoing communication, thecommunication controller is only allowed to transmit this pattern on oneof its possibly two connected channels at a time.

[1414] The Host initiates the wakeup process, whereupon thecommunication controller monitors its channels for meaningfulcommunication consisting of frames, wakeup symbols, or CAS symbols. Theresult of this monitoring determines further wakeup behavior. If nothingmeaningful is received, the wakeup pattern is transmitted; otherwise thecommunication controller aborts the wakeup attempt with an error messageto the Host. The transmission of the wakeup pattern is aborted if acollision is sensed during the transmission. In this case thecommunication controller monitors the channel(s) again to determine thereason for the collision.

[1415] The FlexRay protocol does not support partial networks, i.e.,networks in which some nodes are awake and some nodes are asleep. Thisimplies that the wakeup process attempts to wake all nodes on allavailable channels before startup is initiated. It also implies that acluster that is already communicating is already fully awake and doesnot require any further wakeup procedures.

[1416] Wakeup Channel Monitoring

[1417]FIG. 48 shows a structure of the Wakeup Channel Monitoring. Foreasier presentation, the process of listening for frames and wakeupsymbols has been depicted serially, while these processes shouldactually run concurrently.

[1418] The ‘Wakeup channel monitoring’ phase ensures that no ongoingcommunication is disturbed by the transmission of the wakeup pattern. Alisten time is defined, during which the communication controller triesto detect meaningful communication on its connected channels.

[1419] If frames are received, the wakeup is immediately aborted. A‘received frame’ within this context is considered to have occurred ifthe S_SuccessfulHeaderReception event occurs for one of the configuredchannels. Since other nodes are already communicating with one another,no wakeup is necessary (whoever initiated the cluster startup ensuredthat all available channels are awake). The same applies if a wakeupsymbol is received on the channel that the communication controller isattempting to awaken.

[1420] The reception of a CAS symbol prolongs the listen phase. As isdescribed in the following sections, a frame can be expected to followsoon after the CAS if it really was a CAS symbol and not noise, so thereception of that frame is relied upon to trigger the abort. Thisreduces the sensitivity of the process to noise because noise perceivedas a CAS symbol does not abort the process.

[1421] When the listen phase is over, the communication controller waitsfor at least one channel to become idle. This reduces the risk ofinterrupting communication that is just received. It cannot be requiredthat both channels in a two-channel system be idle since then a faulty,noisy channel could prevent the system wakeup. Most symbols and frames,especially during the startup phase where communication is more sparseand thereby more easily overlooked than during later phases, occur onboth channels at the same time. E.g. the CAS symbol is transmittedsimultaneously on both channels. Requiring at least one channel to beidle prevents the wakeup from beginning to transmit while such a symbolis received on both channels but before it is recognized. Thecommunication controller allows only a pre-defined number of attempts totransmit the wakeup pattern. If this number is exceeded, the wakeupprocess is aborted.

[1422] Wakeup Pattern Transmission

[1423]FIG. 49 shows a structure of a Wakeup Pattern Transmission. Thewakeup pattern consists of several repetitions of the wakeup symbol. Thewakeup symbol (defined above) consists of an active and an idle period.The communication controller listens during the idle period for channelactivity. If this activity exceeds a threshold, the transmission isaborted. This mechanism resolves collisions between several nodesbeginning to transmit the wakeup pattern at nearly the same time. Thisthreshold is chosen to ensure that at least one node continuestransmitting the pattern. While the wakeup pattern itself is collisionresilient and is still recognizable when two such patterns collide, itis this sensing in the idle period that makes the wakeup mechanismrobust against any number of collisions.

[1424] If such a collision is sensed, the communication controllerreturns to the ‘channel monitoring’ phase. There, a collision withanother wakeup pattern can be verified and signaled to the Host.

[1425] After successful transmission of the wakeup pattern or the abortof the wakeup attempt, the communication controller returns to its resetstate and awaits instructions from the Host.

[1426] FlexRay Startup—Time-Triggered Protocol Mode

[1427] Startup assumes all nodes in the cluster are awake (at least inthe error-free case). Only nodes connected to all available channels maybe configured as sync nodes (which are allowed to start up the cluster).Thus, in the absence of faults, the transmissions of a sync node arevisible to every node in the cluster.

[1428] Startup establishes a global timing scheme that—within certainbounds—is the same within all nodes in the cluster. The ability tocalculate the proper point in time for transmitting and/or receivingeach frame relies on it. Also, the clock synchronization algorithmrelies on this basic timing scheme so that all nodes can apply clockcorrection terms simultaneously (at the end of odd-numbered cycles).

[1429] The maximum clock drift that can occur between any two nodes inthe cluster within one cycle has to be known in order to configure thenecessary listen timeouts.

[1430] Until a node enters the protocol operation phase that succeedsthe protocol startup phase (see below), its message buffers do not needto be updated. No data frame transmission and reception is possiblebefore that time. FIG. 50 shows a global structure of startup.

[1431] Each correctly configured node begins the startup process (afterfinishing the wakeup process for coldstart capable nodes) by enteringthe ‘channel monitoring and selection of startup path’ phase. Each nodethat is allowed to start up the cluster monitors its connected channelsand participates in the process of selecting the initiator of thecoldstart process. This process is designed to eliminate all but onesync node, which then assumes the responsibility for performing thecoldstart. This coldstart initiator traverses the right path in FIG. 50.

[1432] All other nodes passively wait for the selected node to initiatecommunication. The reception of a sync frame with an even cycle counter(indicated by S_ValidEvenStartupFrame) causes them to enter theintegration path shown on the left of FIG. 50.

[1433] After the designated check has been successful, the node entersnormal operation and is allowed to transmit data frames.

[1434] Channel Monitoring and Selection of Startup Path

[1435]FIG. 51 shows a structure of the Channel Monitoring and Selectionof a Startup Path. The ‘startup channel monitoring’ phase is similar tothe channel monitoring phase of the wakeup. Each node listens to itsconnected channels and tries to recognize ongoing communication. If anS_ValidEvenStartupFrame is received, the node enters the integrationpath. The sync nodes that are allowed to start up the cluster wait fortheir listen time-out to expire. A received frame(S_SuccessfulHeaderReception) or CAS symbol (S_CASReception) prolongsthe time-out. When the time-out expires, the node enters the coldstartpath. In case no activity at all is detected, a special timeout expiresand thereby enables a fast startup.

[1436] Selection of ColdStart Initiator

[1437]FIG. 52 shows a structure of the Selection of a ColdStartInitiator. After the expiration of the listen timeout in the channelmonitoring phase, the sync nodes configured to do so, transmit a CASsymbol. This CAS symbol resets the listen-timeout of other potentialcoldstart initiators still in the listening phase, causing them toremain in the monitoring phase. After the transmission, these nodesinitialize their communication schedule and await their assigned slot,where they will transmit a sync frame with cycle counter zero. This syncframe will force all nodes in the monitoring phase to enter theintegration path.

[1438] Several nodes may enter the selection phase nearly simultaneouslyand transmit their CAS symbol at nearly the same time. This situation isresolved by requiring nodes in this phase to reenter the monitoringphase if they receive a sync frame or a CAS symbol. Due to theunambiguous assignment of slots to the various nodes, all nodes but one(usually the one the earliest slot) will leave this phase after at mostthree cycles (clock oscillator deviations may require a second or thirdcycle for collision resolution).

[1439] After three cycles the node enters the ‘Communicationestablished’ check.

[1440] Check on Successfully Established Communication

[1441]FIG. 53 shows a check on a successfully established communication.The coldstart initiator has transmitted three sync frames without beinginterrupted. Now it can expect the first replies of other sync nodes. Itcontinues transmitting its sync frame in the designated slot.

[1442] At the end of each cycle it reviews the sync frames it hasreceived during the current cycle. If it has received more sync framesthat do not fit into its communication schedule than sync frames thatdo, it aborts the startup and reenters the monitoring phase. Thisbehavior prevents the creation of several cliques with disagreeingperceptions of time.

[1443] At the end of each odd cycle, the coldstart initiator performsadditional tests. If at least one pair of sync frames has been received,it performs the clock synchronization using these pairs (see Chapter“Clock Synchronization”). If the resulting correction values are outsidespecified bounds, it aborts the coldstart and reenters the monitoringphase. If the values are within the specified bounds, and at least onepair of sync frames has been received, it enters normal operation mode.This ensures that at least two sync nodes agree upon the timing schedulebefore any data frames may be transmitted. It enables stable clocksynchronization for the two nodes and all other nodes that subsequentlyintegrate into the now established communication.

[1444] A counter observes how many cycles the coldstart initiator spendsin the coldstart path. If too many cycles pass without this nodeentering the normal operation mode, startup is aborted and the node maynot again try to start up the cluster. This prevents faulty nodes frompersistently disturbing the startup.

[1445] Initial Synchronization

[1446]FIG. 54 shows a structure of an initial synchronization. If a nodein the monitoring phase receives a sync frame with even cycle counter(S_ValidEvenStartupFrame), it enters the integration path. The node thathas transmitted the sync frame automatically becomes the reference nodefor the receiver.

[1447] If this reference node has been the reference node in a previousunsuccessful integration attempt, it is not selected and another syncframe is awaited. If no sync frame from another node is received withina specified amount of time, the previously unsuccessful reference nodeis given another chance.

[1448] The integrating node sets its own cycle counter to the valuereceived in the sync frame and awaits the sync frame of the referencenode in the following odd cycle. Using this pair of frames, theintegrating node corrects its clock towards the timing of thetransmitter of these frames. If no sync frame with an odd cycle counterfollows the even-numbered frame that triggered the integration attempt,the node aborts the integration.

[1449] Check on Successful Integration

[1450]FIG. 55 shows a check on a successful integration. During thischeck phase, the node is still not allowed to transmit any frames. Itnow has an understanding of time derived from its reference node. Duringthe subsequent cycle it listens for sync frames from all nodes, not justfrom its reference node. The node checks the timing information that ithas derived from the reference node against all observablecommunication, considering sync frames only.

[1451] At the end of each cycle, it determines if the majority of theobserved sync frames are consistent with the timing scheme it hasderived. If not, it declares its integration attempt failed and reentersthe monitoring phase. Note that it tries to select another sync node asreference node for the ensuing new integration attempt as describedabove.

[1452] At the end of each odd cycle, it performs the offset clockcorrection as described in Chapter “Clock Synchronization”. Thecalculated clock correction terms for offset and rate are compared tospecified boundaries. The boundaries for the offset correction are morerelaxed during the first time the correction is performed after enteringthis check phase. If either rate or offset correction value is outsidethe defined boundaries the integrating node aborts the integrationattempt and reenters the monitoring phase.

[1453] Also at the end of each odd cycle, the node counts the number ofslots where it has received even/odd cycle pairs of sync frames. If nopairs have been received the node aborts the integration attempt becausesync frames should have been received from the reference node if nothingelse. If more than one pair has been received, the node enters thenormal operation mode. If the integrating node is allowed to transmitsync frames itself and one pair of sync frames has been received, italso enters normal operation. In normal operation, i.e. during protocoloperation phase, the node is allowed to transmit data and sync frames(if not configured otherwise).

[1454] Wakeup and Startup Modes—Global Structure

[1455] From the CC_SoftReset state, the host shall be able to initiatethe cluster wakeup via the transition G1 (see FIG. 56). For wakeup aswell as for the distinct startup procedures the communication controlleroperates in the top-level HW state CC_Normal. Furthermore, from theCC_SoftReset state one of three distinct startup state machines shall beentered depending on how the configuration settings are chosen.

[1456] In the time-triggered protocol modes mode, i.e., thetime-triggered distributed (TT-D) mode and the time-triggeredmaster-controlled (TT-M) mode, a startup mechanism based on sync framesshall be triggered by the transition G2.

[1457] For FlexRay clusters running in TT-D mode a fault-tolerant,distributed startup shall be performed. In TT-M mode a master controlledstartup shall be performed, but still all mechanisms build on atime-triggered communication cycle.

[1458] For the byteflight (BF) protocol mode and the event-triggered(ET) protocol mode the necessary startup machine transition (G3, G4 orG5, G6 respectively) depends on whether a node is configured as a masternode or not. For the event-triggered protocol mode, the startup behavioris described further on. TABLE 12 Global Startup State Transitions andRespective Conditions for Execution Transition State Direction Actionstaken on Transition from to Condition for Transition Transition G1CC_Soft CC_Wake soft reset released vWakeupCount, Reset Up (in therespective control register) vdWakeup and Listen AND wakeup modeconfigured vdWakeupNoise are set to zero. The wakeup status vector iscleared (vWakeupFrameHeader Received, vWakeupSymbolReceived,vWakeupFailed and vWakeupComplete). G2 CC_Start soft reset releasedvdStartup, up (in the respective control register) vdStartupNoise andListen AND static, mixed or dynamic mode vColdStartCount are configuredset to zero. (gNumberofStaticSlots greater than The startup status orequal one) (A minimum of at vector is cleared least two static slots isrequired for (vCCMS, vSMMS, a static or mixed configuration invOpViaColdstart, FlexRay mode; only one static slot vColdstartAbortedand is configured in dynamic mode.) vColdstartNoise) Error flags vMRCSand vCCLR are cleared G3 CC_byteflight soft reset released Listen (inthe respective control register) AND byteflight mode configured ANDslave role configured (pMaster not set) G4 CC_Send soft reset releasedSymbol (in the respective control register) AND byteflight modeconfigured AND master role configured (pMaster set) G5 describe furtheron G6 describe further on

[1459] Transitions W1 and W5 are described in Table 13 and transition A1is described in Table 14.

[1460] Cluster Wakeup

[1461] This section describes the wake-up path preceding thecommunication startup. Any node entering startup that has coldstartcapability shall first execute the wakeup procedure. Otherwise it cannotbe ensured, that the cluster is awake (or at least that the wakeup hasbeen triggered) before the node begins the startup procedure.

[1462] The Host completely controls the wake-up procedure. Thecommunication controller provides the Host the ability to transmit aspecial wake-up pattern (see above) on each of its available channels.It ensures that ongoing communication on this channel is not disturbed.The communication controller cannot guarantee that all Nodes connectedto this channel wake up due to the transmission of the wakeup pattern(For example, the transmission unit of the bus driver might bedefective.), since these nodes cannot give feedback until the startupphase.

[1463] The Host has to be aware of possible failures of the wakeup andact accordingly. The wakeup procedure enables single-channel devices ina two-channel system to trigger the wakeup, by only transmitting thewakeup pattern on the single channel to which they are connected.Another node then assumes the responsibility for waking the otherchannel. Any node that has coldstart capability must wake both channelsbefore entering startup. Any node without coldstart capability connectedto two channels must wake both channels, if it wants to wake up thecluster.

[1464] The wakeup procedure tolerates any number of nodes simultaneouslytrying to wake up a single channel and resolves this situation such thatonly one node transmits the pattern. Additionally the wakeup pattern iscollision resilient, so even in the presence of one faulty node alsotransmitting a wakeup pattern, the wakeup can be assured.

[1465] Waking One Channel

[1466] The wakeup of the FlexRay system has to be initialized by a Host.The Host of a Node may command its communication controller to send aTx-wakeup pattern on channel vWakeupChannel, while the communicationcontroller itself is in the CC_SoftReset state. The communicationcontroller then enters its wakeup mode and tries to transmit a Tx-wakeuppattern on the configured channel. Finally, it signals back the statusof the wakeup attempt to the Host (refer to the wakeup status vectorfurther on in the text).

[1467] The wakeup mode of the communication controller involves threestates:

[1468] CC_SoftReset

[1469] CC_WakeupListen

[1470] CC_WakeupSend

[1471] Wakeup State Diagram

[1472] The structure of the Communication Controller Wakeup StateMachine is shown in FIG. 57. TABLE 13 Wakeup State Transitions andCorresponding Conditions for Execution. Transition State DirectionAction taken on Transition from to Condition for Transition TransitionW1 CC_Wakeup CC_Soft Reception of a frame header without Set the flagListen Reset coding violation corresponding to(S_SuccessfullHeaderReception) on any the exit condition of theconfigured channels. (refer to the OR Reception of a valid Rx-wakeupsymbol wakeup status on channel vWakeupChannel vector described(S_CheckRxWakeupSymbol occurred). further on). OR (   vWakeupCount ==  gWakeupMax. AND At least one channels is in idle   state. AND (    Listen-timeout vdWakeup     expired (vdWakeup ==     gdWakeup).   ORListen-timeout with noise     vdWakeupNoise expired     (vdWakeupNoise==     gWakeupNoise*     gdWakeup). ) ) W2 CC_Wakeup W1 not fulfilled.Increase Send AND vWakeupCount < gWakeupMax. vWakeupCount by AND Atleast one channels is in idle state. one. AND(   Listen-timeout vdWakeupexpired   (vdWakeup == gdWakeup). OR Listen-timeout with noise    vdWakeupNoise expired     (vdWakeupNoise ==     gWakeupNoise *gdWakeup). ) W3 CC_Wakeup CC_Wakeup Reception of channel activity oneither vdWakeup is reset Listen Listen channel. to zero. W4 CC_WakeupReception of a valid CAS symbol on vdWakeupListen is Listen eitherchannel (S_CASReception reset to zero. occurred) W5 CC_Wakeup CC_SoftTransmission of Tx-wakeup pattern completed. vWakeupComplete Send Resetis set in the startup status vector W6 CC_Wakeup Continuous ‘active low’of more than vdWakeup and Listen gdWakeupMaxCollision detected during anidle vdWakeupListen phase of the Tx-wakeup pattern are reset to zero.(S_CheckWakeupCollision occurred).

[1473] The CC_SoftReset state is part of the overall protocol statediagram. Only in the CC_SoftReset state can the Host configure thecommunication controller and initialize wakeup on channel vWakeupChannel(G1). After the wakeup, the communication controller returns into theCC_SoftReset state and signals to the Host the result of the wakeupattempt:

[1474] Abort because the communication controller has received a frameheader without coding violation, which is signaled by setting thevWakeupFrameHeaderReceived flag (W1).

[1475] Abort because the communication controller has received a validRx-wakeup symbol on channel vWakeupChannel, which is signaled by settingthe vWakeupSymbolReceived flag (W1).

[1476] Abort due to too many wakeup attempts, which is signaled bysetting the vWakeupFailed flag (W1).

[1477] The complete transmission of the Tx-wakeup pattern, which issignaled by setting the vwakeupComplete flag (W5).

[1478] The parameter gWakeupMax defines the maximum number of wakeupattempts allowed. The parameter vWakeupChannel defines the channel thatthe communication controller shall wake.

[1479] CC_WakeupListen State

[1480] The purpose of this state is to ensure that the transmission ofthe Tx-wakeup pattern does not disturb existing communication on channelvWakeupChannel.

[1481] The counter vWakeupCount is set to zero upon transition G1 fromthe CC_SoftReset to the CC_WakeupListen state.

[1482] Two timers are defined:

[1483] vdwakeup

[1484] vdWakeupNoise

[1485] Both timers are set to zero upon entering the CC_WakeupListenstate.

[1486] The vdWakeup timer expires upon reaching gdCycle+gdMaxDrift (onecycle length plus a safety margin). The vdWakeupNoise timer expires uponreaching the amount of time, during which the cluster is able to keepthe clock synchronization within the maximum specified tolerance band.

[1487] The vdWakeup timer is reset, whenever activity is received oneither channel.

[1488] The vdWakeupNoise timer is reset, whenever a valid CAS symbol isreceived on any channel (S_CASReception occurred). A CAS symbolis—depending on the bitrate—rather short, so noise could bemisinterpreted as a CAS symbol. To prevent an abort of the wakeupprocedure due to noise, only the counter is reset when a CAS symbol isreceived. Only the frame following the CAS symbol will trigger theabort. Furthermore, it could be difficult to distinguish a CAS symbolfrom the first portion of a Tx-wakeup pattern.

[1489] If the communication controller receives a frame header withoutcoding violation on any channel (indicated byS_SuccessfulHeaderReception), it reenters the CC_SoftReset state andsets the vWakeupFrameHeaderReceived flag (W1). A communicationcontroller must not transmit a Tx-wakeup pattern when ongoingcommunication is detected. The reception of a frame header without acoding violation is sufficiently robust for the detection of ongoingcommunication.

[1490] If the communication controller receives a valid Rx-wakeup symbolon channel vWakeupChannel, it reenters the CC_SoftReset state and setsthe vWakeupSymbolReceived flag (W1). (The detection shall be morerelaxed than the rigid definition of the Rx-wakeup symbol to taketopology effects, collisions and different clock speeds into account.)An Rx-wakeup symbol on the other channel (if available) is ignored.

[1491] If either of the timers expires and (vWakeupCount<gWakeupMax) andat least one channel is in idle state, the communication controllerenters the CC_WakeupSend state (W2). All meaningful communication duringstartup is transmitted on both channels at the same time. By requiringone channel to be idle, it is ensured that no such transmission isinterrupted by the transmission of the CAS symbol (within theuncertainty of the transmission delay). It cannot be required that bothchannels were idle, since one channel could be defective and noisythereby preventing any wakeup and startup attempt.

[1492] If either of the timers expires and (vWakeupCount==gWakeupMax)and at least one channel is in idle state, the communication controllerreenters CC_SoftReset and sets vWakeupFailed in the wakeup status vector(W1). The wakeup is only aborted after reaching the maximal number oftries when a timer expires. This gives the communication controller timeto listen to the network for ongoing communication or wakeup patternsafter it stepped back from the CC_WakeupSend state.

[1493] CC_WakeupSend State

[1494] In this state, the communication controller transmits theTx-wakeup pattern on the configured channel and checks for collisions.

[1495] Upon entering the CC_WakeupSend state, vWakeupCount is increasedby one.

[1496] The Tx-wakeup pattern as described above is sent on the channelvWakeupChannel.

[1497] During the idle phases of the Tx-wakeup pattern, thecommunication controller listens for activity on the bus. If thecommunication controller receives more than gdWakeupMaxCollision ofcontinuous ‘active low’ during an idle phase (This check is described indetail above and the occurrence of this event is signaled byS_CheckWakeupCollision.), it immediately steps back into theCC_WakeupListen state (W6). Without this listening and aborting, not allcollisions would lead to recognizable wakeup symbols (remember that theTx-wakeup pattern itself is only resilient against collisions of up totwo such patterns). The smaller pdWakeupMaxCollision is, the better thecollision detection gets, but the EMC robustness degrades. A lower boundon the value might be the equivalent to 400 ns for a 10 Mbit/s system.

[1498] After a complete, non-aborted transmission of the Tx-wakeuppattern, the communication controller reenters the CC_SoftReset stateand sets the vWakeupComplete flag in the wakeup status vector (W5).

[1499] Wakeup Application Notes

[1500] Since the Host is closely involved in the wakeup of the FlexRaycluster, in this section the required Host behavior is described. TheHost has to coordinate the bus guardian and the communication controllerwakeup modes. It has to coordinate the wakeup of a two channels and todecide whether, or not, to wake a specific channel.

[1501] Bus Guardian

[1502] In systems that have a bus guardian installed, the Host has tocommand the appropriate bus guardian to enter its wakeup mode before itcommands the communication controller to perform a wakeup. After thecommunication controller returns to the CC_SoftReset state, the busguardian must be commanded to leave its wakeup mode.

[1503] Nodes with Coldstart Capability

[1504] Each node that is configured to perform a coldstart must performa wakeup as described above before continuing with startup. Fortwo-channel clusters it is generally advisable to use the proceduredescribed below.

[1505] For FlexRay clusters in TT-D mode this includes all sync nodesthat are not configured in a listen only mode. For FlexRay clusters inTT-M mode this includes the Master Node.

[1506] Actions of the Host to Initialize the Wakeup

[1507] A Host that wants to perform a wakeup of the cluster has first tocheck its bus driver(s) to see if they have received Rx-wakeup patterns.If the bus driver of a channel did not receive an Rx-wakeup pattern, theHost must try to wake this channel.

[1508] Each communication controller that is configured with coldstartcapability relies upon its Host to have awakened the cluster prior toletting it enter the startup phase. Only the Host can ensure that thewakeup phase is completed before any startup attempt is performed.

[1509] The Host must not wake channels whose bus drivers have receivedan Rx-wakeup symbol unless startup is not possible without an additionalwakeup of those channels. This is done to speed up the wakeup processand to limit the amount of traffic on the channels; thereby, the numberof collisions during this phase is reduced.

[1510] The Host has to command the bus guardian (if available) of thechannel vWakeupChannel to enter its wakeup mode. Then the Host uses theprocedure described above to initialize a wakeup of channelvWakeupChannel. The communication controller may return severaldifferent status conditions that are described in the following section.Before evaluating these conditions, the Host must command the busguardian of channel vWakeupChannel to leave its wakeup mode. If the Hostdoes not cause the BG to leave its wakeup mode (BG_WakeUp), the BGleaves it after a fixed, non-configurable amount of time and enters theBG_FailSilent mode.

[1511] Reactions of the Host to the Status Flags Signaled by theCommunication Controller

[1512] This section defines the various status conditions that thecommunication controller can return to the Host as outcomes of itswakeup attempt and the recommended reactions of the Host. Theseconditions are generally mutually exclusive, but in two-channel systemsan Rx-wakeup symbol could be received on channel vWakeupChannel while avalid frame header is received on the opposite channel at the same time.The wakeup still fulfills its function when the exit conditions aregiven a precedence and are thereby made mutually exclusive (highest tolowest priority): Transmission complete, a frame header without codingviolation has been received, an Rx-wakeup symbol has been received, theallowed number of wakeups has been exceeded.

[1513] A Frame Header Without Coding Violation has been Received

[1514] When a frame header without coding violation is received by thecommunication controller on either available channel duringCC_WakeupListen, the communication controller aborts the wakeup, even ifchannel vWakeupChannel is still silent.

[1515] The Host must not configure the communication controller toperform additional wakeup attempts, since this may disturb ongoingcommunication. Instead, it shall configure the communication controllerto enter the startup to integrate into the already running cluster.

[1516] An Rx-wakeup Symbol has been Received

[1517] The communication controller has received an Rx-wakeup symbol onchannel vWakeupChannel during its CC_WakeupListen state. This means,that another Node is already waking this channel. To prevent collisionsof Tx-wakeup patterns on channel vWakeupChannel, the communicationcontroller aborts the wakeup.

[1518] If another channel is available that is not already awake, theHost shall configure the communication controller to wake this channel.Otherwise, it shall configure the communication controller to enterstartup.

[1519] The Transmission has been Completed

[1520] The communication controller has transmitted the completeTx-wakeup pattern on channel vWakeupChannel.

[1521] If another channel is available that is not already awake, theHost shall configure the communication controller to wake this channel.Otherwise, it shall configure the communication controller to enterstartup.

[1522] The Allowed Number of Wakeup Attempts has been Exceeded

[1523] The communication controller was not able to transmit a completeTx-wakeup pattern because each of its gWakeupMax attempts to transmit itresulted in at least gdWakeupMaxCollision occurrences of continuous‘active low’ during an idle phase of the pattern. Two possible reasonsfor this are heavy EMC disturbances on the bus or a babbling node. Onecause, not responsible for this abort, is the collision with anotherTx-wakeup pattern. Such a collision can be recognized after reenteringthe CC_WakeupListen state and would be signaled by setting the flagvWakeupSymbolReceived.

[1524] Since no complete Tx-wakeup pattern has been transmitted, itcannot be assumed that all nodes have received an Rx-wakeup symbol. TheHost may use the retransmission procedure described below.

[1525] Waking Two Channels

[1526] This section describes how the Host can wake both channels of atwo-channel system.

[1527] It is forbidden for a communication controller to send aTx-wakeup pattern on both channels at the same time. (This rule wasestablished to ensure that an erroneous communication controllercouldn't disturb ongoing communication by transmitting wakeup patternson both channels at the same time.) So, if it is necessary to wake bothchannels, the host must wake them one at a time. The Host can use theprocedure for sending a Tx-wakeup pattern on one channel (see above)twice—once for the first channel and after that for the second channel.

[1528] For an example of this procedure, see below.

[1529] Retransmission of Wakeup Symbols

[1530] Some events may prevent a cluster wakeup by a Tx-wakeup patternwithout the transmitting communication controller being able toimmediately detect it (E.g. an erroneous star that needs significantlymore time to start up and to be able to forward messages.). After adefined amount of time, the Host can detect such an error when thecluster does not start up after wakeup as expected, or the Host's owncommunication controller's attempt to start up the cluster fails.

[1531] The Host may then perform a retransmission of the Tx-wakeuppattern. It has to command the bus guardian (if available) of the chosenchannel into its wakeup mode. The communication controller has to bebrought into the CC_SoftReset state; then the procedure described abovecan be used to transmit a Tx-wakeup pattern on channel vWakeupChannel.Afterwards, the bus guardian must be commanded to leave its wakeup mode.

[1532] Note that this may disturb ongoing communication of other nodesif the node performing the wakeup procedure experiences an incoming linkfailure.

[1533] Transition to Startup

[1534] It may be several hundred milliseconds (depending on the hardwareused) before all nodes and stars are completely awakened and configured.To perform a startup in the FlexRay time-triggered distributed protocolmode, at least two sync-Nodes are needed. A node is called a sync nodeif the host has set pSyncNode in the host interface. For a non-syncnode, pSyncNode is set to false. The configuration parameter can only beset or cleared in the CC_SoftReset state. The transmission of more thanone sync frame by a node within one cycle has to be prevented by thecommunication controller. For this protocol mode, sync-Nodes shallgenerally not enter the CC_StartupListen state immediately afterperforming the wakeup unless the vColdStartInhibit flag is set. Acommunication controller without the vColdStartInhibit flag set will tryto start up the cluster, but may fail, since no other communicationcontroller may be ready to join the communication before the coldstartinitiator aborts the startup attempt because it has reached the maximumnumber of cold start attempts allowed. (This scenario will still resultin a successful startup, as long as some of the other sync nodes areconfigured to initialize the startup. The node that has woken thenetwork and failed to startup will still join the communication startedby another node.) The Host must clear this flag after sufficient timehas passed to allow the other nodes in the cluster to awaken.

[1535] Transmission of Wakeup Symbols During Normal Operation

[1536] During normal operation, the Host can set the payload of framesthat it transmits to a pattern that mimics two consecutive Tx-wakeupsymbols (This applies only for NRZ coding defined above). Note thatsince the wakeup symbol has a fixed length, the number of bits necessaryto construct a payload that is equivalent to two such wakeup symbolsdepends on the bit rate of the system. It may not be feasible toconstruct such a payload for every combination of allowed bit rate andstatic slot length (especially short ones). However, in this case it maystill be possible to construct a dynamic frame with this payload if thedynamic segment is sufficiently long to allow it. Depending on thesystem configuration, it may even be possible to use two consecutivestatic frames.

EXAMPLES

[1537] This section describes in more detail the Host-communicationcontroller interaction for the wakeup in two typical situations.Firstly, it is described, how one Host wakes both channels of atwo-channel system. Secondly, it is described, how one node connected toonly one channel of a two-channel system wakes this channel and how async node (connected to both channels) wakes the other channel.

[1538] Since also the transition between wakeup and startup isdescribed, the examples may be more readily understood with a priorunderstanding of FlexRay startup, which is described in subsequentsections.

[1539] Two Channel Wakeup by One Node

[1540]FIG. 58 shows a Simple Wakeup. Larger (ms range) amount of timesare represented by dotted lines.

[1541] This section describes a FlexRay system with two channelsconfigured and operating in time-triggered distributed protocol mode. Itis described how one sync-node first wakes the cluster and then performsthe startup.

[1542] Node 1 is awake. It has decided to wake up the cluster. Node 2and Node 3 are in a power-saving sleep mode.

[1543] The Host of Node 1 (Host 1) checks for wakeup activity bychecking if one of its bus drivers has received an Rx-wakeup symbol.Since neither of them has, Host 1 must wake both channels.

[1544] Host 1 commands BG 1B (the bus guardian of Node 1 and channel B)to enter its wakeup mode.

[1545] Host 1 commands CC 1 (the communication controller of Node 1) towake up channel B by setting vWakeupChannel to channel B andsetting/clearing the needed bits in the CC-Host interface (for a moredetailed description, see further on in the description).

[1546] CC 1 enters the CC_WakeupListen state. It does not receive anyactivity on either channel. So the timer vdWakeup expires. The CC 1enters the CC_WakeupSend state.

[1547] During the CC_WakeupSend state, the Tx-wakeup pattern istransmitted on channel B. During the idle phases of the Tx-wakeuppattern, CC 1 detects no activity on channel B. After completetransmission, the CC 1 sets vWakeupComplete and reenters CC_SoftReset.

[1548] Host 1 commands BG 1B to leave its wakeup mode.

[1549] The wakeup pattern has triggered the wakeup receiver of the busdriver of Node 2 (which is connected only to channel B). Node 2initializes.

[1550] Host 1 has meanwhile read the wakeup status vector of CC 1 andcontinues waking the other channel.

[1551] Host 1 commands BG 1A to enter its wakeup mode.

[1552] Host 1 sets vWakeupChannel to channel A and commands CC 1 toexecute the wakeup mode.

[1553] CC 1 again enters the CC_WakeupListen state. It does not receiveany activity on either channel. So the timer vdWakeup expires. The CC 1enters the CC_WakeupSend state.

[1554] During the CC_WakeupSend state, the Tx-wakeup pattern istransmitted on channel A. During the idle phases of the Tx-wakeuppattern, CC 1 detects no activity on channel A. After the completetransmission, the CC 1 sets vWakeupComplete and reenters CC_SoftReset.

[1555] Host A commands BG 1A to leave its wakeup mode.

[1556] The wakeup pattern has triggered the wakeup receiver of the busdriver of Node 3 (which is connected only to channel A). Node 3initializes.

[1557] Host A reads out the wakeup status vector of CC 1 and decides tocontinue with the startup, since both channels have been awakened. Itsets the vColdStartInhibit flag and commands CC 1 to enter theCC_StartupListen state.

[1558] After some time, Node 2 and Node 3 are completely configured.Neither are sync nodes and each is only connected to one of twochannels. Additionally, their bus drivers signal that they have receivedRx-wakeup patterns, so their Hosts must not perform a wakeup of theirown. Instead, both Hosts command their communication controllers tobegin Startup.

[1559] Both CC 2 and CC 3 remain in the CC_StartupListen state.

[1560] Finally Node 1 decides that enough time has passed to allow theother Nodes in the cluster to wake up and configure themselves. Itclears the vColdStartInhibit flag of its communication controller andallows it thereby to enter the CC_ColdStartICW state.

[1561] See below for details on the startup procedure.

[1562] Wakeup Forwarding by One Node

[1563]FIG. 59 shows a Simple Wakeup with Forwarding. Larger (ms range)amount of times are represented by dotted lines.

[1564] This section describes a FlexRay system with two channelsconfigured and operating in time-triggered distributed protocol mode. Itis described, how first a non-sync node connected to only one channelwakes its channel, and how then a sync node forwards the Tx-wakeuppattern to the opposite channel and initiates the communication.

[1565] Node 1 is awake. It has decided to wake up the cluster. Node 2and Node 3 are in a power-saving sleep mode.

[1566] The Host of Node 1 (Host 1) checks for wakeup activity bychecking if its bus driver has received an Rx-wakeup symbol.

[1567] Since it has not, Host 1 decides to wake its channel. Since thisnode is not a sync node, the Host does not have to wake its channelbefore entering the startup. In this example, the application demands itanyway.

[1568] Host 1 commands BG 1B (the bus guardian of Node 1 and channel B)to enter its wakeup mode.

[1569] Host 1 commands CC 1 (the communication controller of Node 1) towake up channel B by setting vWakeupChannel to channel B andsetting/clearing the needed bits in the CC-Host interface (for a moredetailed description, see the following description).

[1570] CC 1 enters the CC_WakeupListen state. It does not receive anyactivity on its channel. So the timer vdWakeup expires. The CC 1 entersthe CC_WakeupSend state.

[1571] During the CC_WakeupSend state, the Tx-wakeup pattern istransmitted on channel B. During the idle phases of the Tx-wakeuppattern, CC 1 detects no activity on channel B. After completetransmission, the CC 1 signals this by setting the vWakeupComplete flagand reenters the CC_SoftReset state.

[1572] Host 1 commands BG 1B to leave its wakeup mode.

[1573] The wakeup pattern has triggered the wakeup receiver of the busdriver of Node 2 (which is connected to both channels). Node 2initializes.

[1574] Host 1 reads the wakeup status vector of CC 1. It notices that CC1 completed the transmission and commands CC 1 to enter theCC_StartupListen state. Node 1 is not a sync Node and has now to waitfor some other Node to initialize startup.

[1575] Meanwhile, Node 2 has awakened. Node 2 is a sync Node and isallowed to perform a coldstart, so it must perform a wakeup beforeentering startup.

[1576] Host 2 checks for wakeup activity by evaluating if one of its busdrivers has received an Rx-wakeup symbol. It notes that the bus driverof channel B has received an Rx-wakeup symbol and so only has to wakechannel A.

[1577] Host 2 commands BG 2A to enter its wakeup mode.

[1578] Host 2 sets vWakeupChannel to channel A and commands CC 2 toexecute the wakeup process.

[1579] CC 2 enters the CC_WakeupListen state. It does not receive anyactivity on either channel. So the timer vdWakeup expires. The CC 2enters the CC_WakeupSend state.

[1580] During the CC_WakeupSend state, the Tx-wakeup pattern istransmitted on channel A. During the idle phases of the Tx-wakeuppattern, CC 2 detects no activity on channel A. After the completetransmission, the CC 2 signals this by setting the vWakeupComplete flagand reenters the CC_SoftReset state.

[1581] Host 2 commands BG 2A to leave its wakeup mode.

[1582] The wakeup pattern has triggered the wakeup receiver of the busdriver of Node 3 (which is connected only to channel A). Node 3initializes.

[1583] Host 2 reads out the wakeup status vector of CC 2 and decides tocontinue with the startup. Since some other Node had already awakenedchannel B, Host 2 assumes that other Nodes are already awake andinitialized. It clears the vColdStartInhibit flag and commands CC 2 toenter the CC_StartupListen state.

[1584] See below for detailed information on the startup procedure.

[1585] Communication Startup and Reintegration

[1586] Corresponding to the supported protocol modes, three differentmechanisms for communication startup are specified. Clusters operatingin the time-triggered distributed (TT-D) mode follow a fault-tolerant,distributed startup strategy; for the time-triggered master-controlled(TT-M) mode this is reduced to a master controlled system behavior(refer to transitions indicated by prefix ‘S’; see FIG. 62). A clusterconfigured in byteflight (BF) mode or event-triggered (ET) mode performsan event driven, master controlled startup (state transitions withprefix ‘B’ (byteflight; see FIG. 63) and ‘E’ (event driven; see thefollowing descriptioin), respectively). The protocol operations relatedto synchronization of the running communication schedule, integration offurther nodes to a running cluster, media access rules, and errorhandling are different for the configuration alternatives. Therefore,configuration-specific state diagrams are given in the followingsections for each of these configurations, including state descriptionsand state transitions. The cluster wake-up must precede thecommunication startup in order to ensure that all mechanisms defined forthe startup work properly. After initial wake-up the whole networkbehaves like a broadcast medium.

[1587] Startup—Time-Triggered Protocol Mode (TT-D and TT-M)

[1588] In general, a node may enter communication (i.e., theCC_NormalOperation state) via the coldstart path (CC_ColdStartICW andCC_ColdStartVCW state sequence) initiating the schedule synchronization,or via the integration path (CC_InitSync and CC_IntegrationVCW statesequence) integrating into an existing communication schedule. Only syncnodes are allowed to enter via the coldstart path, and they have tocheck in advance whether there is already channel activity, or not (seebelow).

[1589] In order to establish a global media access schedule, the initialsynchronization of the periodic TDMA schedule must be coordinated amongall connected communication nodes. Since any sync node is permitted toinitiate schedule synchronization, simultaneously started andconflicting attempts by different sync nodes must be resolved. Each nodeinitially transmits a Collision Avoidance Symbol (CAS, see above)specifically for this purpose, before initiating the periodic schedule.This symbol represents a kind of arbiter, which is used to resolveinitial collisions of nodes simultaneously attempting to set up thecommunication schedule.

[1590] Both non-sync nodes and sync nodes start passive integration viathe integration path as soon as they receive sync frames from which toderive the TDMA schedule information. During integration the node has toadapt its own clock to the global clock (rate and offset) and has tomake its cycle time consistent with the global schedule observable atthe network. Afterwards, these settings are checked for consistency withall available network nodes. Only if these checks are passed, can thenode leave the integration phase and actively participate incommunication.

[1591] Several modes are supported that restrict the node's ability tocommunicate or to initiate startup actively (see below). These modes areconfigurable by the host and are explained within in their respectivesections.

[1592] Startup Timeouts

[1593] A sync node shall maintain two different timers supporting twotimeout values, vdStartup and vdStartupNoise. The expiration of eitherof these timers causes the node to leave the initial sensing phase(CC_StartupListen state) with the intention of starting upcommunication. Even though the following description is based on theassumption that these timers increment their values (starting with areset value of zero), it is allowable for the implementation to chooseanother realization (e.g. counter decrement).

[1594] The node local listen-timeout vdStartup shall have the samelength (gdStartup) for each node in the system that is configured tosend an initial CAS during startup (sync node). The upper boundgdStartup limits the listen time used by a node to determine if there isalready communication between other nodes or at least one sync nodeactively requesting the integration of others.

[1595] Due to the initial clock drift between the set of nodes that arealready actively communicating (transmitting sync frames), and the nodethat is attempting to integrate, the listen-timeout must consider themaximum accumulated drift over the length of one cycle. Therefore thetime-out interval gdStartup shall be constrained by the followinginequality (gdStartup is derived internally from the configurationparameters gdCycle and gdMaxDrift. In addition, the upper boundary forthe listen timeout, vdStartupNoise, is a multiple of gdStartup and isconfigurable using the parameter gStartupNoise.):

gdStartup≧gdCycle+gdMaxDrift

[1596] The maximum allowable drift between any two clocks in the networkis an important system parameter and is known at design time. This‘worst case’ period has to be covered by configuring gdMaxDrift (unit:macroticks) accordingly.

[1597] While counting is based on macrotick granularity, the reset ofthe timer vdStartup shall be performed asynchronously to the macrotickclock. The timer vdStartup shall be reset (vdStartup=0) upon enteringthe CC_StartupListen state.

[1598] Further reset conditions for the timer vdStartup are defined asfollows (see also FIG. 60):

[1599] 1. If communication channel activity (Any signal edge detectableat the receiver (i.e., a signal edge, which has passed the glitchfilter) is referred to as “channel activity” (channel state machine hasentered the active state).) is detected on one of the configuredpChannels channels while the node is in the CC_StartupListen state, thelisten-timeout vdStartup shall be reset.

[1600] 2. As long as the channel status of one of the configuredpChannels channels is active the timer is continuously reset. The timershall resume counting once the channel idle state is reached for allpChannels channels and the node is still in the CC_StartupListen state.

[1601] Once the listen-timeout vdStartup expires (vdStartup=gdStartup),neither an overflow nor a cyclic restart of the timer shall beperformed. The status has to be kept for further processing by thestartup state machine (see Table 14).

[1602] At the same time the listen-timeout vdStartup is started for thefirst time (transition from CC_SoftReset to the CC_StartupListen state),a second timeout vdStartupNoise shall be started with vdStartupNoise=0.This additional timeout is used to improve reliability of the startupprocedure in the presence of noise.

[1603] While counting is based on macrotick granularity, the reset ofthe timer vdStartupNoise shall be performed asynchronously to themacrotick clock. The timer vdStartupNoise shall be reset upon enteringthe CC_StartupListen state.

[1604] Further reset conditions for the timer vdStartupNoise and itsbehavior are defined as follows (see also FIG. 61):

[1605] 1. The transition from channel idle to channel active shall notinfluence the timer. The node has to receive a certain pattern (s.below) in order to reset the timer vdStartupNoise.

[1606] 2. If S_SuccessfulHeaderReception or S_CASReception occur for anychannel while the node is in the CC_StartupListen state, thelisten-timeout vdStartupNoise shall be reset.

[1607] Once the listen-timeout vdStartupNoise expires(vdStartupNoise=gStartupNoise*gdstartup), neither an overflow nor acyclic restart of the timer shall be performed. The status has to bekept for further processing by the startup state machine (see Table 13).

[1608] Since the timeout vdStartupNoise won't be reset if channelactivity is sensed (see FIG. 61), this timeout defines the fallbacksolution that guarantees that a node will try to start up thecommunication cluster even in the presence of noise. On the other hand,by having defined certain reset conditions, the synchronization of thecoldstart entry is still guaranteed. The expiration of vdStartupNoiseand the resulting entry into the coldstart path is captured in thevariable vNoise (vNoise is set to ‘true’).

[1609] Listen-Only Mode

[1610] A FlexRay node shall support a listen-only mode. In listen-onlymode, the node shall be able to receive all frames after successfulintegration to the running communication; i.e. the node is fullysynchronized and performs the clock synchronization in order to keepthis status. In comparison to the normal operation mode(CC_NormalOperation state) the node does not actively participate incommunication, i.e. neither symbols nor frames are transmitted.

[1611] Setting vListenOnly to true while in the CC_SoftReset stateconfigures the listen-only mode. vListenOnly cannot be set to true afterleaving the CC_SoftReset state, but can be cleared at any time.

[1612] This mode supports communication diagnosis (‘monitoring’) as wellas dedicated wake-up strategies, which require host interaction(vListenOnly subsequently cleared) in order to actively participate incommunication after wake-up.

[1613] In listen-only mode, sync nodes behave like non-sync nodes duringstartup. Specifically, this applies to the prerequisites fortransitioning from CC_IntegrationVCW to CC_PassiveOperation. Passing thevalidation check requires that at least two different sync nodes arealready synchronized and able to communicate. Please refer to thedescription of the validation check described below.

[1614] ColdStart-Inhibit Mode

[1615] A FlexRay node shall support a coldstart inhibit mode. Incoldstart inhibit mode the node shall be prevented from initializing theTDMA communication schedule. If the host has set vColdStartInhibit, thenode shall not be allowed to initialize the cluster communication afterhaving checked on existing communication, i.e. entering the coldstartpath is prohibited. The node shall be allowed to integrate to a runningcluster or to acknowledge another node, which initially tries to startthe cluster communication.

[1616] Coldstart inhibit mode vColdStartInhibit can be set in theCC_SoftReset state only. vColdStartInhibit cannot be set after leavingthe CC_SoftReset state, but can be cleared at any time.vColdStartInhibit can be mapped to the gColdStartMax configurationparameter, which utilizes the zero value to keep the node from startingthe network on its own initiative (refer to the chapter “hostinterface”). It has to be checked whether the parameter gColdStartMaxcan be accessed during run time, i.e., after leaving CC_SoftReset state,as this is required for the “coldstart inhibit” function.).

[1617] Once the node is synchronized, vColdStartInhibit shall notrestrict the node's ability to receive frames or to transmit frames.

[1618] Startup State Diagram—Time-Triggered Protocol Mode (TT-D andTT-M)

[1619]FIG. 62 shows a Startup State Diagram—Time-Triggered Protocol Mode(TT-D and TT-M) TABLE 14 State Transitions and Corresponding Conditionsfor Execution State Transition Direction Action taken on Transition fromto Condition for Transition Transition S1 CC_Startup CC_ColdStart nodeis configured as a sync node Reset vdInitial Listen ICW (pSyncNode ==true; ColdStartPhase to gColdStartMax > 0) zero. AND vColdStartCount <gColdStartMax Immediately AND vListenOnly is false transmit CAS ANDvColdStartInhibit is false symbol and start AND not S2 cycle timing.Start AND ( transmitting the    at least one channel is in sync frame   channel idle state according to the slot AND at least one of thefollowing schedule.    timers expired: Increment    listen-timeoutvdStartup vColdStartCount by    (vdStartup == gdStartup) one.   listen-timeout with noise If vdStartupNoise    vdStartupNoise expiredhas expired, the auxiliary variable ) vNoise is set S2 CC_StartupCC_Init Reception (The frame reception Set vRefSync to Listen Synccomprises the detection of channel fFrameID of idle state after theframe) of an S_ValidEvenStartup S_ValidEvenStartupFrame on one of FramepChannels channels AND (  vRefSync == 0  (no integration historyavailable) OR fFrameID is different from    vRefSync OR TT-M modeenabled ) S3 CC_Startup vdCycleWithHistory expired Reset vRefSync toListen (vdCycleWithHistory == gdStartup) zero. S4 CC_Startup receptionof a frame header on one Reset Listen of pChannels channelsvdStartupNoise to (S_SuccessfulHeaderReception zero. occurred) ORreception of a valid CAS symbol on one of pChannels channels(S_CASReception occurred) S5 CC_Startup reception of channel activity onany Reset vdStartup to Listen channel zero. S6 CC_ColdStart CC_Startupreception of a valid CAS symbol on vdStartup and ICW Listen one ofpChannels channels vdStartupNoise are (S_CASReception occurred) reset tozero. OR reception of a frame header on one If vRefSync is not ofpChannels channels zero, reset vdCycle- (S_SuccessfulHeaderReceptionWithHistory to zero. occurred) Set the flag OR ( vColdStartAborted   end of current cycle (derived or    from local cycle time) vCCMS,respectively. AND vColdStartCount is equal to Stop timing and   gColdStartMax transmitting the    ) Note: Due to this definition itis sync frame. possible that a node stops current startup process(re-enter CC_StartupListen from CC_ColdStartICW), even though therehasn't been any possibility for other nodes to answer until then. S7CC_ColdStart not S6 Start clock VCW AND end of current cyclesynchronization. (derived from local cycle time) Increment ANDvdInitialColdStartPhase expired vColdStartCount by(vdInitialColdStartPhase == one. gdInitialColdStartPhase) S8CC_ColdStart CC_Startup ( vdStartup and VCW Listen    end of currentcycle vdStartupNoise are    (derived from local cycle time) reset tozero. AND vColdStartCount is equal to If vRefSync is not   gColdStartMax zero, reset vdCycle- AND not S9 WithHistory to zero. )OR ( If gColdStartMax    end of current cycle was reached, the   (derived from local cycle time) flag vCCMS is set. ANDvInvalidSyncCount[ch] ≧ If the majority was    vValidSyncCount[ch] forany missed for    channel ch validation, the ) OR ( vSMMS flag is set.   end of current cycle If the rate or offset    (derived from localcycle time) correction value AND |vOffsetCorrection| > exceeded itslimit,    pOffsetCorrectionOut the vCCLR flag is ) OR ( set.    end ofcurrent cycle Stop timing, clock    (derived from local cycle time)synchronization and AND |vRateCorrection| > transmitting the   pRateCorrectionOut sync frame.    Note: It is assumed that the   vOffsetCorrection is set to zero    for cycles with even cycle   counter value [(vCycle MOD    2)=0] by the clock )    synchronizationunit S9 CC_Normal end of current cycle Enable the Operation (derivedfrom local cycle time) transmission of data AND (vCycle MOD 2) == 1frames. AND vInvalidSyncCount[ch] < The flag vValidSyncCount[ch] for allch vOpViaColdstart is AND |vOffsetCorrection| ≦ set.pOffsetCorrectionOut If vNoise is set, the AND |vRateCorrection| ≦ flagvColdstartNoise pRateCorrectionOut is set. AND ( The flags vMRCS    TT-Mmode enabled and vCCLR are OR vSyncPairs is at least one cleared. ) S10CC_InitSync CC_Startup S_ValidOddStartupFrame with vdStartup and ListenfFrameID = vRefSync too late vdStartupNoise are ORS_ValidOddStartupFrame with reset to zero. fFrameID = vRefSync too earlyIf vRefSync is not Note: During the CC_InitSync state, zero, resetvdCycle- the node tries to catch the WithHistory to zero. correspondingThe flag vMRCS is S_ValidStatupFrameOdd, which set. belongs to theinitial S_ValidEvenStartupFrame. Besides the check on the matching frameidentifier, the derived correction value for the rate adoption must notexceed certain limits. The parameter pRateCorrectionInitOut determinesthese boundaries, and the terms ‘too late’ and ‘too early’ relate tothis definition. S11 CC_(—) end of current cycle Start clock Integration(derived from local cycle time) synchronization. VCW AND (vCycle MOD 2)== 1 The flag vOffsetOut is cleared. S12 CC_(—) CC_Startup ( vdStartupand Integration Listen    end of current cycle vdStartupNoise are VCW   (derived from local cycle time) reset to zero. ANDvInvalidSyncCount[ch] ≧ If vRefSync is not    vValidSyncCount[ch] forany ch zero, reset vdCycle- ) OR ( WithHistory to zero.    end ofcurrent cycle If the majority was    (derived from local cycle time)missed for AND (vCycle MOD 2) == 1 validation, the AND vOffsetOut ==true vSMMS flag is set.    (an offset correction value If the rate oroffset    greater than correction value    pOffsetCorrectionOut hasexceeded its limit,    already been accepted once) the vCCLR flag is AND|vOffsetCorrection| > set.    pOffsetCorrectionOut If the transition was) OR ( triggered due to the    end of current cycle vSyncPairs value,   (derived from local cycle time) the flag vMRCS is AND (vCycle MOD 2)== 1 set. AND |vOffsetCorrection| > Stop clock   pOffsetCorrectionInitOut synchronization. ) OR (    end of currentcycle    (derived from local cycle time) AND (vCycle MOD 2) == 1 AND|vRateCorrection| >    pRateCorrectionOut ) OR (    end of current cycle(derived    from local cycle time) AND (vCycle MOD 2) == 1 AND value ofvSyncPairs not big    enough    (refer to section 0) ) S13 CC_Normal notS12 Enable the Operation AND end of current cycle transmission of data(derived from local cycle time) frames. AND (vCycle MOD 2) == 1 Theflags vMRCS AND vInvalidSyncCount[ch] < and vCCLR arevValidSyncCount[ch] for all relevant cleared. ch (A channel withvInvalidSyncCount[ch] == vValidSyncCount[ch] == 0 is disregarded forvalidation analysis) AND vSyncPairs is big enough (refer to section 0)AND vListenOnly is false AND |vOffsetCorrection| ≦ pOffsetCorrectionOutAND |vRateCorrection| ≦ pRateCorrectionOut S14 CC_(—) CC_Passive not S12The flags vMRCS Integration Operation AND end of current cycle and vCCLRare VCW (derived from local cycle time) cleared. AND (vCycle MOD 2) == 1AND vInvalidSyncCount[ch] < vValidSyncCount[ch] for all relevant ch ANDvSyncPairs is big enough (refer to section 0) AND vListenOnly is trueAND |vOffsetCorrection| ≦ pOffsetCorrectionOut AND |vRateCorrection| ≦pRateCorrectionOut S15 CC_Passive CC_Normal end of current cycle Enablethe Operation Operation (derived from local cycle time) transmission ofdata AND vListenOnly is false frames. A1 All CC_(—) soft reset initiatedStates SoftReset (in the respective control register)

[1620] CC_StartupListen State

[1621] A FlexRay node shall enter the CC_StartupListen state from theCC_SoftReset state when the communication controller is ready to attemptcommunication startup or enter a running network. If the communicationcontroller is capable of initiating a startup attempt, the Host shallfirst ensure that the cluster is awake before letting the communicationcontroller enter the CC_StartupListen state.

[1622] When entering the CC_StartupListen state from CC_SoftReset orre-entering from any other state of the startup state machine other thanthe CC_StartupListen state itself, sync nodes shall (re-)start theirlisten-timeout vdStartup and their listen-timeout with noisevdStartupNoise (see above).

[1623] The global cluster constant gColdStartMax defines the number ofcycles a node shall be permitted to attempt a coldstart, i.e. the numberof cycles a node may reside in coldstart path. Once vColdStartCount isequal to gColdStartMax the node shall not enter the coldstart path (Thiscould be achieved by preventing the restart of the listen-timeoutsvdStartup and vdStartupNoise.). vColdStartCount is only reset uponentering the CC_StartupListen state from the CC_SoftReset state.

[1624] Non-sync nodes shall not enter the coldstart path, because thesenodes are not allowed to initiate communication on their own. This couldbe achieved by several means, e.g. for non-sync nodes gColdStartMax isconfigured to zero, or the listen-timeouts vdStartup and vdStartupNoiseare not maintained.

[1625] Upon the reception of an S_ValidEvenStartupFrame the integrationpath shall be entered via the CC_InitSync state. Furthermore, vRefSyncmust be zero (see strategy defined in order to prevent a node fromrepetitively choosing a faulty node as a reference). fFrameID shall bestored to vRefSync, in order to store the identifier of the referenceframe, and thereby a representation of the corresponding sync node forfurther processing (see below).

[1626] If at least one of the channels is in channel idle state, atleast one of the listen-timeouts vdStartup or vdStartupNoise has expiredand the entry condition to the integration path is not fulfilled, thenode shall enter the CC_ColdStartICW state.

[1627] A node that failed to integrate to the reference node that wasselected to derive initial rate and offset information, shall notutilize the same node for an integration attempt during the nextcommunication cycle. Therefore, a node shall maintain a history ofreference nodes it has attempted to use in order to avoid repetitiveselection of the same reference node. It must be ensured that a node inthe CC_StartupListen state selects a sync node different from the formerreference node if present.

[1628] If an integration attempt fails with a selected reference nodethe reference node shall not be permanently excluded from the list ofpotential reference nodes. Due to a transient disturbance theintegration might have failed even though the reference node operatedfault-free (A corrupted sync frame might prevent the transition inCC_InitSync state or CC_IntegrationVCW state). Therefore, the followingstrategy shall be applied after an integration attempt has failed (seebelow).

[1629] A node entering CC_StartupListen shall reset and start a timerwith the timeout value vdCycleWithHistory, if vRefSync is nonzero. Thistimer shall encompass the same time period gdstartup as the vdStartuptimeout.

[1630] The timeout vdCycleWithHistory shall not be reset due to channelactivity in the CC_StartupListen state

[1631] Upon the expiration of timeout vdCycleWithHistory, vRefSync shallbe cleared. This setting (vRefSync=0) prevents the restart ofvdCycleWithHistory

[1632] The node shall only enter integration path (via the CC_InitSyncstate), if the fFrameID of a received S_ValidEvenStartupFrame is notequal to the ID stored in vRefSync. Since there is only one sync nodeavailable in TT-M mode, it is counterproductive to attempt to sync to adifferent node.

[1633] In TT-M mode, a non-sync node shall not perform the above-definedstrategy. In TT-M mode, a single sync node, i.e. the master exists. Allnon-sync nodes and their synchronization are fully dependent on themaster node. Therefore, this node is never excluded as a potentialreference. When entering the CC_StartupListen state from any otherstate, vRefSync is cleared (i.e., set to zero).

[1634] When re-entering the CC_StartupListen state from any state, therate correction value shall be reinitialized withpMicroOverheadperCycleNom.

[1635] CC_ColdStartICW (Initial Check Window) State

[1636] Only sync nodes shall be allowed to enter the coldstart path viathe CC_ColdStartICW state. The phase, for which a sync node is in theCC_ColdStartICW state, shall be used for the following purposes:

[1637] It has to be ensured that a single sync node is going to startthe communication cluster. Therefore, other sync nodes have to beprevented from entering the coldstart path. When multiple nodes entersimultaneously the CC_ColdStartICW state, a resolution mechanism ensuresthat all but one return to CC_StartupListen state.

[1638] In the CC_ColdStartICW state the coldstart initiating node isexpected to have exclusive access to the channels in the fault-freecase. Other nodes that are integrating based on the sync frame receptionof the coldstart initiator always follow a defined procedure thatensures that for initial cycles in the integration path these nodes staypassive. Consequently, the node initiating the coldstart should notreceive any responses while in the CC_ColdStartICW state. Therefore, anyframe reception during the CC_ColdStartICW state is due to another nodehaving entered coldstart path at the same time (refer to bullet above)or to an error scenario.

[1639] In the CC_ColdStartICW state, a sync node shall transmit aninitial CAS symbol and shall then transmit its configured sync frameperiodically to enable the startup of the entire network. By startingthe first communication cycle after CAS transmission, the cycle counteris initialized to zero; thus the first sync frame is transmitted withfCycleCount equal to zero.

[1640] By transmitting the CAS symbol, other sync nodes are preventedfrom entering the coldstart path. If more than a single sync nodetransmits the CAS symbol simultaneously, those nodes all enter theCC_ColdStartICW state simultaneously. However, their cycle timing isinherently synchronized so this scenario is resolvable during the nextcycles while in CC_ColdStartICW state.

[1641] The reception of a valid CAS symbol (S_CASReception occurred) ora frame header (indicated by S_SuccessfulHeaderReception) on any channelshall cause the node to re-enter CC_StartupListen state immediately.

[1642] In the CC_ColdStartICW state a node shall not transmit normaldata frames, which are frames without sync bit set.

[1643] A node shall remain in the CC_ColdStartICW state for a certainperiod determined by the initial coldstart phase(gdInitialColdStartPhase). A timer vdInitialColdStartPhase shall bereset and started, when CC_ColdStartICW is entered. This timer shallcover the initial slot used for CAS transmission as well as threecomplete communication cycles (refer to the definition ofgdInitialColdStartPhase in the following part of the description).Thereby, gdInitialColdStartPhase determines the time a node stays in theCC_ColdStartICW state before entering CC_ColdStartVCW.

[1644] Upon the transition into another state the timervdInitialColdStartPhase shall be stopped.

[1645] A node in time-triggered distributed (TT-D) mode with an“incoming link failure” shall stop transmission after a predefinedinterval of time. Thereby other sync nodes are enabled to take overresponsibility of starting the communication for the cluster.

[1646] For this feature the additional counter vColdStartCount shall bemaintained.

[1647] With the transition into the CC_ColdStartICW state the variablevColdStartCount shall be incremented by one.

[1648] With each new cycle-start in the CC_ColdStartICW state,vColdStartCount shall be incremented by one.

[1649] At the end of each cycle, vColdStartCount is compared to theallowed maximum gColdStartMax. If vColdStartCount is equal togColdStartMax, the node shall re-enter the CC_StartupListen state. Inthis case, the node that initiates the coldstart has not been able toachieve communication with another node (transition toCC_NormalOperation state) within gColdStartMax cycles.

[1650] Once this condition had become true, the sync node shall not beable to enter the coldstart path again. Only the host can reset thisstatus (by forcing the transition to the CC_SoftReset state).

[1651] A node in time-triggered master-controlled (TT-M) mode shall notmaintain the vColdStartCount counter.

[1652] CC_ColdStartVCW (Validation Check Window) State

[1653] In the CC_ColdStartVCW state, the node shall maintain periodictransmission of its sync frame on cycle basis—but no other frames shallbe scheduled for transmission. In addition, the node shall perform avalidation check at the end of each cycle in order to assess the networkimage perceived for the current cycle. Depending on the result of thevalidation check, the node

[1654] shall remain in the CC_ColdStartVCW state, if no response hasbeen received at all (and vColdStartCount is smaller thangColdStartMax),

[1655] shall step back to the CC_StartupListen state, if the responsedoes not fit to the node-local communication schedule,

[1656] shall enter normal operation (the CC_NormalOperation state), ifthe response is in accordance with the node-local communicationschedule.

[1657] This list applies for sync nodes in time-triggered distributed(TT-D) mode. For FlexRay clusters operating in time-triggeredmaster-controlled (TT-M) mode, the coldstart initiator is the only nodeconfigured to send sync frames. Therefore, this node shall not wait forany response and shall perform the transition into theCC_NormalOperation state at the end of the cycle.

[1658] By transmitting the sync frame, the coldstart initiator requestsother nodes to join into the given communication schedule. Once thesenodes (At a minimum, the joining of one further sync node is requiredfor TT-D protocol mode.) become active, the coldstart initiator shallleave the coldstart path by entering normal operation, i.e. the protocoloperation phase (POP). In order to transfer a coldstart initiator inTT-D mode into the CC_NormalOperation state, the response of otheractive nodes must pass certain validation criteria. The term ‘response’and the validation check rules are described in detail below.

[1659] Two different mechanisms shall contribute to the validationcheck.

[1660] First, received sync frames must be in accordance to thenode-local communication schedule

[1661] Furthermore, the correction terms of the clock synchronizationmust not exceed the configured boundaries.

[1662] To prepare for the validation check, the node shall observe andassess the communication over one cycle. Two event counters per channel(vValidSyncCount[ch] and vInvalidSyncCount[ch]) shall be administratedin order to support decision-making. In accordance with the staticsegment acceptance criteria (refer to Chapter ‘Frame Processing’ above),a clear distinction between several possible cases can be made for eachslot. These slot scenarios shall be judged and counters shall beincremented according to the following rules:

[1663] if (S_ValidStaticFrame with sync bit set is received on channelch) vValidSyncCount[ch]++;

[1664] end;

[1665] elseif [(an S_CorrectFrame with sync bit failed the staticsegment acceptance due to S_PayloadLengthStaticError, S_FrameIDError orS_CycleCountError on channel ch) and (no sync frame with fFrameID hasalready been taken into account for counter increment during currentcycle)]

[1666] vInvalidSyncCount[ch]++;

[1667] end;

[1668] The validation check counters shall be initialized for allconfigured pChannel channels upon each new cycle start as follows:

[1669] vValidSyncCount[ch]=1;

[1670] vInvalidSyncCount[ch]=0;

[1671] The node shall consider itself to operate correctly and shalltherefore initialize the counters vValidSyncCount[ch] accordingly(pre-set to one).

[1672] The validation check shall be passed, if vValidSyncCount[ch] isgreater than vInvalidSyncCount[ch] for all configured channels. Thetransition to CC_NormalOperation shall be only permitted, if the checkis passed with vValidSyncCount[ch]>1 on at least one of the pChannelchannels.

[1673] With the transition to CC_ColdStartVCW and with each new cyclestart in CC_ColdStartVCW, the variable vColdStartCount shall beincremented by one. At the end of each cycle, vColdStartCount shall becompared to the allowed maximum gColdStartMax. If vColdStartCount isequal to gColdStartMax, the node shall re-enter the CC_StartupListenstate.

[1674] In CC_ColdStartVCW, the node shall execute the global clocksynchronization for offset and rate according to the regular rules.CC_ColdStartVCW is the latest point in time the clock synchronizationincluding measurement and correction phase has to be active. The nodecould perform clock synchronization already in the ColdStartICW state.This might be advantageous for the TT-M protocol mode and theestablishment of the two-cycle based rate measurement phase. Accordingto the definition of the regular rate measurement phase, all sync framesshall be registered and pair-wise (sync frames with same frameidentifier) evaluated for clock synchronization. The offset measurementphase shall be applied in accordance to the regular scheme, too. Thismeans that for each cycle with an odd cycle counter value the relatedsync frames shall be used to determine next offset correction term. Thesync frames received from nodes that have integrated upon the coldstartattempt are delayed by two times the overall (network) propagationdelay. This has to be considered for the setting of the offsetcorrection term boundary (anyway).

[1675] The node in the CC_ColdStartVCW state requires at least oneadditional matching pair of sync frames suitable for rate measurement(same frame identifier, consecutive occurrence in ‘even/odd’ cycleorder), in order to fulfill one of the necessary prerequisites forentering CC_NormalOperation. Upon reception of two valid, matchingframes (S_ValidStaticFrame) in even/odd cycle order, the node inCC_ColdStartVCW shall increment the counter vSyncPairs. As long as thenode does not receive a response, it performs the clock correction basedon one “pair of matching sync” frames, namely its own transmissions(this is taken into account by using the value 0 as ‘measurementsample’). The introduction of vSyncPairs is done in order to ease thedescription of several distinctions to be made in the specification. Asan auxiliary variable, it is not required that this parameter is usedfor an implementation of a FlexRay protocol controller. With thebeginning of each rate measurement phase in CC_ColdStartVCW state, thecounter vSyncPairs shall be reset to zero.

[1676] In addition to the prerequisite that necessary sets ofmeasurement samples are available (vSyncPairs is greater than zero), thequality of the resulting correction terms for clock synchronizationshall be assessed. The node is only permitted to execute transition intothe CC_NormalOperation state if the correction terms for both rate andoffset are within the configured limits

[1677] |vOffsetCorrection|≦pOffsetCorrectionOut

[1678] |vRateCorrection|≦pRateCorrectionOut

[1679] If one of the correction terms violates the limit settings, thenode shall re-enter the CC_StartupListen state.

[1680] CC_InitSync State

[1681] A node shall enter CC_InitSync after having received anS_ValidEvenStartupFrame on one of the configured pChannel channels inthe CC_StartupListen state. In the CC_InitSync state, the node shall notschedule any transmission.

[1682] The node variable vRefSync shall contain the frame identifier ofthe sync frame that has been used to enter the integration path. Thesync node corresponding to this reference frame is called the referencenode.

[1683] In the CC_InitSync state an initial rate correction value shallbe determined in order to adjust the local macrotick timing to thetiming given by the reference node (referred to as “rate adoption”). Toaccomplish this, the time between the initial occurrence of thereference frame and its next occurrence is measured and the differencefrom the nominal cycle length shall be applied as the rate correctionterm.

[1684] In order to improve robustness of the entire integration processagainst temporary disturbances, the reception of S_ValidStartupFrame istracked for each channel separately. That means that if the initial syncframe has been received on channel A and the next sync frame on thischannel is missing, the node shall remain in the CC_InitSync state ifthe rate adoption can still be based on the other channel, i.e. onchannel B. This requires the correct reception of a valid pair ofS_ValidStartupFrame (starting with S_ValidEvenStartupFrame) on thesecond channel. In no case a pair of frames shall be constituted out ofmeasurements picked from different channels, i.e. cross-channelmeasurement is prohibited.

[1685] The node shall administer means to ensure that a transition backinto the CC_StartupListen state is performed, if

[1686] S_ValidOddStartupFrame is received too early on one of thechannels ch, for which an S_ValidEvenStartupFrame has already beenreceived

[1687] no S_ValidOddStartupFrame is received within a defined period onany of the channels ch for which an S_ValidEvenStartupFrame has alreadybeen received

[1688] In essence, the captured initial rate correction value must notexceed a configured limit, which is given by pRateCorrectionInitOut.

[1689] Once a valid rate correction term has become available, the nodeshall run with the corrected rate (direct application of the correctionterm).

[1690] Furthermore, S_ValidOddStartupFrame shall be used to determinethe nominal schedule position. This operation shall be based on thereceived identifier fFrameID. The node shall set its local cycle timeaccordingly, i.e., it shall synchronize the micro- and macrotickcounters to the first BSS (falling edge) of the received sync frame. Thecycle counter value fCycleCount of the received sync frame shall beextracted and used to initialize the local cycle counter.

[1691] In this manner, the local schedule is established according tothe information derived from the reference node. The node shall followthe local schedule until the end of the current cycle withouttransmitting actively.

[1692] Any further reception shall be ignored and neither rate noroffset measurements shall be performed. At the end of the cycle, thenode shall transit into CC_IntegrationVCW state.

[1693] CC_IntegrationVCW State

[1694] In the CC_IntegrationVCW state, the node shall not schedule anytransmission.

[1695] In CC_IntegrationVCW the node shall confirm the settings copiedfrom the reference node with the overall network communication scheme.For this purpose the node shall perform a cycle-based validation checksimilar to the check defined for the CC_ColdStartVCW state (see above).Since the node still behaves passively, the initialization of theadministered counters differs from that for a node in CC_ColdStartVCW(which transmits a sync frame and thus participates actively in thevalidation check).

[1696] The validation check counters shall be initialized for allconfigured pChannel channels upon each new cycle start as follows:

[1697] vValidSyncCount[ch]=0;

[1698] vInvalidSyncCount[ch]=0;

[1699] Counter increment shall be performed according to the followingrules: if (S_ValidStaticFrame with sync bit set is received on channelch)   vValidSyncCount[ch]++; end; elseif [(an S_CorrectFrame with syncbit failed the static segment acceptance due toS_PayloadLengthStaticError, S_FrameIDError or S_CycleCountError onchannel ch) and (no sync frame with fFrameID has already been taken intoaccount for counter increment during current cycle)]  vInvalidSyncCount[ch]++; end;

[1700] The validation check shall be considered to be passed ifvValidSyncCount[ch] is greater than vInvalidSyncCount[ch] for allchannels except those for whichvValidSyncCount[ch]==vInvalidSyncCount[ch]==0. If both thevInvalidSyncCount and the vValidSyncCount are equal to zero for allconfigured channels, the validation check fails.

[1701] The transition into CC NormalOperation can only take place if thevalidation check has been passed, but additionally further conditionsmust be satisfied (see clock correction term assessment and nextparagraphs, respectively). The validation check shall run concurrentlywith these additional checks until the validation check itself fails ora state transition due to another condition is executed.

[1702] When the node enters CC_IntegrationVCW, a regular measurementphase for the next rate correction term shall be started. According tothe definition of the regular rate measurement phase, all sync framesshall be registered and pair-wise (sync frames with same frameidentifier) evaluated for clock synchronization. The offset measurementphase shall be applied in accordance to the regular scheme, too. Thismeans that for each cycle with an odd cycle counter value the relatedsync frames are used to determine next offset correction term.

[1703] An integrating sync node requires at least one matching pair ofsync frames suitable for rate measurement (same frame identifier,consecutive occurrence in ‘even/odd’ order) in order to fulfill one ofthe necessary prerequisites to enter CC_NormalOperation state. Usingthis pair of sync frames, the node can acknowledge an existing node inCC_ColdStartVCW or simply integrate to a synchronized cluster. Thenumber of matching pairs of sync frames shall be accumulated invSyncPairs.

[1704] The counter vSyncPairs shall be evaluated at the end of an oddcycle.

[1705] For sync nodes that do not operate in listen-only mode(vListenOnly is false) vSyncPairs needs to be at least one, otherwise nointegration shall be possible. In that case, the node shall re-enter theCC_StartupListen state. This characterizes the scenario, where theoriginal reference node does not maintain proper sync frame transmissionfor the entire integration phase.

[1706] This holds also for nodes in TT-M mode, which are going tointegrate to the ‘master’-driven schedule. The parameter vSyncPairsneeds to be at least one; otherwise no integration shall be possible. Inthat case, the node shall re-enter the CC_StartupListen state.

[1707] If a sync node is configured as a listen-only node (vListenOnlyis true), it has to fulfill the same condition as non-sync nodes in TT-Dprotocol mode. These nodes need to receive at least two matching pairsof sync frames suitable for rate measurement (same frame identifier,consecutive occurrence). Only if there is already a communicationestablished comprising at least two sync nodes (nodes in theCC_NormalOperation state) can non-sync nodes (or sync nodes inlisten-only mode) join in. For these nodes vSyncPairs needs to be atleast two, otherwise no integration shall be possible. The node shallre-enter the CC_StartupListen state, if vSyncPairs is zero.

[1708] With the beginning of each rate measurement phase in theCC_IntegrationVCW state, the variable vSyncPairs shall be reset to zero.

[1709] In addition to the prerequisite that necessary sets ofmeasurement samples are available (vSyncPairs is large enough, seeabove), the quality of the resulting correction terms for clocksynchronization must be acceptable. A node shall be allowed to joinactive communication (transition into the CC_NormalOperation state),only if the correction terms for both rate and offset are within theconfigured limits

[1710] |vOffsetCorrection|≦pOffsetCorrectionOut

[1711] |vRateCorrection|≦pRateCorrectionOut.

[1712] If one of the correction terms violates the limit settings, thenode has to re-enter CC_StartupListen.

[1713] The only exception to this rule is for the first time an offsetcorrection value is available in the CC_IntegrationVCW state. In thisspecial case the correction value vOffsetCorrection may exceed theconfigured limit pOffsetCorrectionOut, which is applied during regularclock synchronization. The initial offset correction value shall becompared against the limit pOffsetCorrectionInitOut.

[1714] |vOffsetCorrection|≦pOffsetCorrectionInitOut

[1715] If this more relaxed requirement can be met, the node shallremain in the CC_IntegrationVCW state, but shall not transit into theCC_NormalOperation state.

[1716] After the application of the initial offset correction term (andthe check against the pOffsetCorrectionInitOut limit) in theCC_IntegrationVCW state, the next offset correction term has to meet theregular pOffsetCorrectionOut limit. That means the described exceptionis only made once, i.e., when the first offset correction term isavailable.

[1717] In order to ensure proper processing, a flag vOffsetOutshall beset to true once the initial offset correction term check has beenperformed. The introduction of vOffsetOut is done in order to ease thedescription in the specification. As an auxiliary variable it is notrequired that this parameter is used for an implementation of a FlexRayprotocol controller. This flag shall be always evaluated, if a newoffset correction term should be checked against the configured limitsettings. The flag vOffsetOut is initialized to false, ifCC_IntegrationVCW is entered from the CC_InitSync state.

[1718] The combination of all these checks ensures that the node onlybecomes an active transmitter if the local time base (including thecycle counter and the clock synchronization parameters) is consistentwith the global time as represented by the majority of active sync nodesin the system.

[1719] CC_NormalOperation State

[1720] As soon as the node that transmitted the first CAS symbol(resolving the potential access conflict and entering startup viacoldstart path) and one additional node have entered theCC_NormalOperation state, the startup phase is finished for a cluster inTT-D protocol mode.

[1721] In TT-M protocol mode, the single sync node enters theCC_NormalOperation state without any communication counterpart. This isdue to its master role in the time-triggered master-controlled mode.

[1722] In the CC NormalOperation state, all configured messages will bescheduled for transmission. This includes all data frames as well as thesync frame.

[1723] CC_PassiveOperation State

[1724] In the CC_PassiveOperation state a node shall not transmit any ofits configured frames. Nevertheless, the node shall not stop allactivities—it shall perform clock synchronization based on the receivedsync frames, the reception of messages and the full support of the hostinterface.

[1725] In addition, the CC_PassiveOperation state is used to support the‘listen only’ protocol feature, where nodes are fully synchronized andreceive all available frames (including receive buffer update), butshall not transmit anything. This mode shall be indicated byvListenOnly, which can be set by the host in the CC_SoftReset stateonly. As soon as the host clears vListenOnly, the CC NormalOperationstate shall be entered at the beginning of the next cycle.

[1726] Startup—byteflight Protocol Mode (BF)

[1727] A correctly configured sync master communication controller(pMaster is true) shall enter the startup sequence via the transitionfrom CC_SoftReset to CC_byteflightMaster.

[1728] A single node should be configured as the sync master node, whichmust send a status symbol on all gChannels channels. For the sync masternode pChannels must be equal to gChannels.

[1729] A correctly configured slave node communication controller(pMaster is false) shall enter the startup sequence via the transitionfrom CC_SoftReset to CC_byteflightListen.

[1730] All slave nodes shall synchronize to the status symboltransmitted by the sync master node. If that node does not start, thesystem does not start up.

[1731] Slave nodes start their communication cycle on both channels withthe reception of the first valid status symbol on one of the pChannelschannels.

[1732] For a detailed description of the byteflight protocol mode,please refer to M. Peller, J. Berwanger, and R. Greissbach, byteflightSpecification, version 0.5, BMW Corporation 1999, available athttp://www.byteflight.com.

[1733] Startup State Diagram—byteflight Protocol Mode (BF)

[1734]FIG. 63 shows a Startup State Diagram of the byteflight ProtocolMode (BF) TABLE 15 State Transitions and Corresponding Conditions forExecution Action State State Direction taken on Transition from toCondition for Transition Transition B1 CC_byteflight CC_byteflightreception of a valid status symbol at one Listen Slave of pChannelschannels AND vListenOnly is false B2 CC_byteflight reception of a validstatus symbol at one of pChannels channels Passive AND vListenOnly istrue (‘Listen-only’ mode is an invalid configuration for the masternode!) B3 CC_byteflight CC_byteflight network idle time reached SlaveListen (vMacrotick == gdCycle-gdNIT; based on local timers) B4 CC_SendCC_byteflight transmission of the status symbol Symbol Master finishedB5 CC_byteflight CC_Send end of current cycle (derived from local MasterSymbol cycle time) B6 CC_byteflight CC_byteflight network idle timereached Passive Listen (vMacrotick == gdCycle-gdNIT; based on localtimers) A1 All States CC_Soft soft reset initiated Reset (in therespective control register)

[1735] CC_SendSymbol State

[1736] A single node that has been configured as sync master (pMaster isset) shall send a status symbol. With the end of the transmission thetimers (of the receiver unit) shall be started according to thedefinitions in the byteflight specification (see M. Peller, 1.Berwanger, and R. Greissbach, byteflight Specification, version 0.5, BMWCorporation 1999, available at http://www.byteflight.com) and the nodeshall enter the CC_byteflightMaster state.

[1737] When a node enters the CC_SendSymbol state while a framereception is ongoing the reception process is stopped.

[1738] CC_byteflightMaster State

[1739] A node shall send and receive messages in the CC_byteflightMasterstate according to its configuration. Upon entering theCC_byteflightMaster state, i.e. after the transmission of the statussymbol, the startup phase is completed. The master node does not needany acknowledgement from other nodes.

[1740] CC_byteflightListen State

[1741] All slave nodes (pMaster is false) shall wait in theCC_byteflightListen state for the reception of a valid status symbol.All configured pChannels channels shall be independently monitored. Thetransition into CC_byteflightSlave and therefore the synchronization ofboth channels to the master shall be done on reception of the firstvalid status symbol. After initialization of the wait timers, allconfigured channels shall operate asynchronously with respect to therequired frame mini-slotting on each of the pChannels channels.

[1742] CC_byteflightSlave State

[1743] Slave nodes shall synchronize to a valid status symbol andtransmit and receive messages in the CC_byteflightSlave state accordingto their configuration.

[1744] CC_byteflightPassive State

[1745] In CC_byteflightPassive a node shall not transmit any of itsconfigured frames. The node shall not stop all activities, but shallcontinue performing synchronization to status symbols (via theCC_byteflightListen state) and the reception of messages.

[1746] The CC_byteflightPassive state is used to support the ‘listenonly’ protocol feature, where the node shall be fully synchronized andshall receive all available frames (including receive buffer update),but shall not transmit anything. This mode shall be indicated byvListenOnly, which can be set by the host in the CC_SoftReset stateonly. As soon as the host clears vListenOnly, the CC_byteflightSlavestate shall be entered with beginning of the next cycle.

[1747] Since the communication controller performs the transition toCC_byteflightListen state with every communication cycle, it is stillsynchronized to the master node. Therefore, the node is allowed todirectly re-enter CC_byteflightSlave from CC_byteflightListen (at thebeginning of the next cycle), if the host sets vListenOnly to false.

[1748] Startup—Event-Triggered Protocol Mode (ET)

[1749] The node's behavior during startup is described further on in thedescription.

[1750] Startup Examples—Time-Triggered Protocol Mode (TT-D)

[1751] For all startup sequences described in this chapter theassumption is made that the correction terms for clock synchronizationexactly match the limit settings of the quality assessment criterion(see above). Therefore, the node is allowed to proceed directly intonormal operation (CC NormalOperation state) after having performed theoffset measurement, correction phase, and regular rate measurement phasethe first time.

[1752] Startup without Collisions

[1753] The scenario illustrated in FIG. 64 depicts three nodes with twoof them configured to initiate the startup actively (sync nodes A andB). Node C is not configured to schedule any sync frames and thereforeis not allowed to enter CC_ColdStartICW. The first cycle counter valuereceived by nodes B and C is in the sync frame sent by node A and it iseven.

[1754] Node A enters CC_ColdStartICW and transmits the initial CASbefore any other node. Triggered by the related channel activity, node Brestarts its listen-timeout vdStartup. On the reception of the CASsymbol, the listen-timeout vdStartupNoise is restarted. With the firstsync frame (fFrameId=3) is sent by node A all other nodes enterCC_InitSync. At this point Node A becomes the reference node(vSyncRef=3) and the measurement phase for initial rate correction termis started. The next occurrence of node A's sync frame stops the ratemeasurement phase. Nodes B and C directly determine and apply the ratecorrection term to their local clock rate (i.e. to their local macrotickgeneration unit). In addition, the actual schedule position isdetermined based on the reference frame ID, and the micro- and macroticktimers are synchronized using the falling edge of the leading BSS of thereceived sync frame.

[1755] Nodes B and C follow the current schedule until cycle end andthen transition into the CC_IntegrationVCW state. Still these nodesbehave passively, i.e., they do not participate the communicationschedule with their own frames. After one complete rate measurementperiod (2 cycles) and the corresponding offset measurement andcorrection phase (during the second cycle), the sync node B is allowedto enter normal operation. The validation checks evaluated in theCC_IntegrationVCW state are passed because on the reception of thereference sync frame vValidSyncCount[ch] is incremented, whilevInvalidSyncCount[ch] remains unchanged. Consequently, with the start ofnext cycle, node B enters CC_NormalOperation and starts to transmitmessages according to its configuration. On reception of the sync framepair sent by another node (node B), which is synchronized to its own,the node that initially sent the CAS (node A) then entersCC_NormalOperation at the start of next communication cycle (after awhole rate measurement period has been concluded). In CC_NormalOperationall configured frames are scheduled for transmission. As soon as thenode that initially sent the CAS and one other node have entered theCC_NormalOperation state, the startup phase is concluded.

[1756] Node C enters CC_NormalOperation in the same cycle as node A, assoon as it performs the regular rate measurement phase based on 2 (ormore) pairs of corresponding sync frames.

[1757] Startup with Initial Collision

[1758]FIG. 65 shows a Startup with a collision on the CAS symbol. Thescenario illustrated in FIG. 65 depicts three nodes with all of themconfigured to initiate the startup actively (sync nodes). A collisionduring startup results when two sync nodes leave the CC_SoftReset stateat the same, or nearly the same time. In this case, two nodes (nodes Aand B) enter CC_ColdStartICW simultaneously and send their initial CASat the same, or nearly the same time. Both nodes are then prepared tosend their first sync frame. The node with the sync frame having thelower identifier sends its frame first (node B; fFrameID=1). Onreception of this sync frame, the other node (node A), which currentlyresides in the CC_ColdStartICW state, returns to CC_StartupListen andawaits the next S_ValidEvenStartupFrame. The figure depicts the casewhere a node A integrates in the sixth cycle after the cycle in whichthe collision occurred.

[1759] Startup with Nodes Failed Due to the Validation Check

[1760]FIG. 66 shows a Startup with Validation Check in CC_IntegrationVCWFailed. The scenario illustrated in FIG. 66 depicts nodes B and Cstarting integration to the reference node (node A). While nodes B and Care in the CC_IntegrationVCW state the reception of the sync frametransmitted by the reference node fails at both nodes. Thus, thevalidation check at both nodes fails, too. At the end of this cycle bothnodes have to re-enter the CC_StartupListen state. Since vRefSync isdifferent from 0 (vRefSync=3), the first sync frame from the formerreference node (node A) is ignored. Because no other sync frame occursduring gdCycleWithHistory, vRefSync is cleared at the end of this cycle.With the next occurrence of the sync frame sent by node A (vRefSync isset to 3 again), node B and C start another integration attempt. Via theintegration path, both nodes finally synchronize on timing of node A.Meanwhile, Node A remains in the CC_ColdStartVCW state for the entireperiod because it does not detect a valid response.

[1761] Requirements for Hardware States

[1762] Introduction

[1763] This chapter describes the HW states whose support is required bythe CC, BG, electrical and optical BD, and the active star.Additionally, some desirable optional transitions are described. Thestate names are prefixed with a two/three-letter acronym correspondingto the hardware component to which the state pertains (i.e., CC, BG, BDeor BDo). State transition names contain one of two prefixes as follows:

[1764] State transitions with prefix ‘V’ corresponding to certainvoltage levels

[1765] State transitions with prefix ‘L’ indicate states transitionscorresponding to logical conditions

[1766] The remainder of this chapter consists of sections correspondingto each of the FlexRay hardware components. Each of these sectionsconsists of two subsections; a descriptive overview of the component'sstates followed by a more formal behavioral description in the form of astate diagram accompanied by a table detailing the transitions in thediagram.

[1767] Voltage Levels

[1768] In general three different voltage levels and corresponding HWstates have to be distinguished:

[1769] PowerOff—The supply voltage is not available or is below apre-defined level. Consequently, some integrated circuits are not ableto keep their pins in a defined state, e.g. tri-state. The semiconductormanufacturer has to guarantee that during power up/power down nodisturbances occur or has to specify the affected pins and theirbehavior.

[1770] PowerOn—The supply voltage level is high enough to guarantee adefined state of the pins, where no disturbances occur.

[1771] Operating/Normal—The supply voltage level allows full operation(note: Operating/Normal is a substate of PowerOn).

[1772] HW States of the CC

[1773] Overview

[1774] The following overview describes the CC behavior in variousstates. Conditions for entering and exiting these states are describedin the table following the subsequent state diagram.

[1775] Support for monitoring of the voltage levels (brown-outdetection) is only required for stand-alone controllers. This allowsmonitoring to be done by external monitoring hardware.

[1776] CC_PowerOff State

[1777] The voltage is below a pre-defined threshold for proper operation

[1778] Halt of all CC internal clocks

[1779] The CC must not drive any pins

[1780] CC_PowerOn State

[1781] The voltage level is above a threshold to guarantee a definedstate of the pins

[1782] CC_HWReset State

[1783] All controller clocks halt immediately

[1784] The CC must not drive any pins

[1785] CC_Operating State

[1786] The CC supports regular communication function

[1787] CC_Awake State

[1788] CC_SoftReset State

[1789] Immediately halt all CC internal clocks except those that areneeded for operating the host interface.

[1790] CC_Normal State

[1791] Regular communication shall be supported

[1792] CC_ShutdownComplete State

[1793] When this state is present communication is inactive

[1794] CC_Standby State

[1795] The power consumption of the electrical CC is significantlyreduced compared to CC_Normal

[1796] All CC clocks off except those that are needed for wakeupdetection

[1797] Configuration data will remain unchanged

[1798] Communication Controller (CC) State Diagram

[1799]FIG. 67 shows a Communication Controller (CC) state transitiondiagram. Table 16 is a CC state transition table. TABLE 16 CC statetransition table. State Transition Direction Action taken on TransitionFrom State To State Conditions for Transition Transition V1 CC_PowerOffCC_PowerOn CC supply voltage rises above CC_U1 V2 CC_PowerOn CC_PowerOffCC supply voltage drops below CC_U2 L1 CC_HWReset CC_Operating CCexternal reset After hard reset signal is inactive (power-up reset or(AND) Supply voltage is via dedicated reset opt. greater than CC_U3 pin)all initialization for at least CC_t_(v3) data are cleared L2CC_Operating CC_HWReset External reset Disable ability to signal isactive drive pins, all clocks (OR) Supply voltage halt immediately opt.drops below CC_U4 for at least CC_t_(v4) L3 CC_Operation CC_SoftReset ACC_Reset is Immediately halt all requested by the CC internal clockshost except those that are needed for operating the host interface. Allconfiguration data shall be retained. L4 CC_SoftReset Initialization isfinished L5 CC_SoftReset CC_Normal CC_SoftReset is The interrupt statusdeactivated by the shall be cleared host (AND) CC optional soft opt.checks are passed L6 CC_SoftReset CC_Standby CC_SoftReset is Optionaldeactivated AND Optional soft checks did fail L7 CC_NormalCC_ShutdownComplete Current Communication is communication inactiveround is finished AND Host requests a shutdown (e.g. by setting theShutdown Request bit) L8 CC_Awake CC_Standby Host issues a CC Theongoing frame Sleep Command transmission or (OR) Severe failurereception will be opt. condition being finished and the detected by theconfiguration data error management shall be retained of the CC (failureconditions are specified in Chapter “Error Signaling and ErrorHandling”) L9 CC_Standby CC_Awake Host issues a CC CC shall signal aWakeup Command wakeup interrupt to OR The CC detects the host activityon any of the RX pins

[1800] The constants CC_U1, CC_U2, CC_U3, CC_U4, CC_t_(v3) and CC_t_(v4)are product specific and have to be defined in the CC productspecification.

[1801] Note: CC_U1<CC_U3, CC_U2<CC_U4

[1802] HW States of the Electrical Bus Driver (BD)

[1803] Overview

[1804] The following overview describes the electrical BD behavior invarious states. Conditions for entering and exiting these states aredescribed in the table following the subsequent state diagram.

[1805] Support for monitoring of the junction temperature is optional.

[1806] BDe_PowerOff State

[1807] The voltage is below a pre-defined threshold for proper operation

[1808] The BD must not drive any pins (e.g., no reverse current).

[1809] BDe_PowerOn State

[1810] The voltage level is above a threshold to guarantee a definedstate of the pins

[1811] BDe_Operating State

[1812] The BD supports regular communication function

[1813] BDe_Normal State

[1814] Regular communication shall be supported

[1815] BDe_Standby State

[1816] The power consumption of the electrical BD is significantlyreduced compared to BDe_Normal

[1817] The BD is not capable of transmitting regular messages

[1818] The BD's wakeup monitoring function is active.

[1819] BDe_Sleep State

[1820] The BD does not support regular communication

[1821] The BD enters low power consumption mode, e.g. all clocks stoppedand only low power wakeup receiver active. The power consumption issignificantly reduced compared to BDe_Normal

[1822] The BD's wakeup monitoring function is active

[1823] BDe_BusOff State

[1824] The BD's channel output is in high impedance state, e.g. itdoesn't drive the idle level on the bus (is floating instead)

[1825] BDe_BusNormal State

[1826] The BD outputs regular bus levels for communication

[1827] BD State Diagram (Electrical BD)

[1828]FIG. 68 shows a bus driver (BD) state transition diagram for anelectrical BD. Table 17 is a BD state transition table for an electricalBD. For the optical bus guardian states refer to FIG. 69. TABLE 17 BDstate transition table (electrical BD). State Transition DirectionAction taken on Transition From State To State Conditions for TransitionTransition V1 BDe_PowerOff BDe_PowerOn BD Supply voltage rises aboveBDe_U1 V2 BDe_PowerOn BDe_PowerOff BD Supply voltage drops below BDe_U2V3 BDe_BusOff BDe_BusNormal BD Supply voltage rises above BDe_U5 for atleast BDe_t_(v5) V4 BDe_BusNormal BDe_BusOff BD Supply voltage dropsbelow BDe_U6 for at least BDe_t_(v6) L1 BDe_Normal BDe_Standby Hostcommands change to BDe_Standby State (e.g. via SPI command) L2BDe_Standby BDe_Normal Host commands change to BDe_Normal State (e.g.via SPI command) OR BD has detected a valid Wakeup event (local or viabus) L3 BDe_Operating BDe_Sleep Host commands The transmitter change toBDe_Sleep will be disabled, State (e.g. via SPI signaling to thecommand) host OR No databus activity detected for more than BDe_t₁ OR BDSupply voltage drops below BDe_U4 for at least BDe_t_(V4) (OR) BDjunction opt. temperature raises above BDe_K_(T1) ° C. L4 BDe_SleepBDe_Operating BD has detected a The transmitter valid Wakeup event willbe released, (local or via bus) signaling to the AND BD Supply voltageis host above BDe_U3 for at least BDe_t_(V3) (AND) BD junction opt.temperature is below BDe_K_(T1) ° C.

[1829] The constants BDe_U1, BDe_U2, BDe_U3, BDe_U4, BDe_U5, BDe_U6,BDe_t₁, BDe_t_(v3), BDe_t_(v4), BDe_t_(v5), BDe_t_(v6) and BDe_K_(T1)are product specific and have to be defined in the BD productspecification.

[1830] Note: BDe_U1<BDe_U3, BDe_U2<BD2<U4

[1831] HW States of the Optical BD

[1832] Overview

[1833] The following overview describes the optical BD behavior invarious states. Conditions for entering and exiting these states aredescribed in the table following the subsequent state diagram.

[1834] BDo_PowerOff State

[1835] The voltage is below a certain threshold for proper operation

[1836] The CC must not drive any pins

[1837] BDo_Normal State

[1838] The BD supports regular communication

[1839] BDo_Sleep State

[1840] The BD does not support regular communication

[1841] The BD is in low power consumption mode, e.g. all clocks stoppedand only low power wakeup receiver active

[1842] The BD's wakeup monitoring function is active

[1843] BD State Diagram (Optical BD)

[1844]FIG. 69 shows a bus driver (BD) transition diagram for an opticalBD. Table 18 is a BD state transition diagram for an optical BD. TABLE18 BD State Transition Table (optical BD). Action State TransitionDirection taken on Transition From State To State Conditions forTransition Transition V1 BDo_PowerOff BDo_PowerOn BD Supply voltageraises above BDo_U1 V2 BDo_PowerOn BDo_PowerOff BD Supply voltage dropsbelow BDo_U2 L1 BDo_Normal BDo_Sleep Host commands change to BDo_SleepState OR No databus activity detected for more than BDo_t₁ L2 BDo_SleepBDo_Normal Host commands change to Bdo_Normal State OR BD has detected avalid Wakeup event (local or via bus)

[1845] The constants BDo_U1, BDo_U2 and BDo_t₁ are product specific andhave to be defined in the BD product specification.

[1846] HW States of the BG

[1847] Overview

[1848] The following overview describes the BG behavior in variousstates. Conditions for entering and exiting these states are describedin the table following the subsequent state diagram.

[1849] Support for monitoring of the voltage levels (brown-outdetection) is only required for stand-alone controllers, whereas themonitoring can also be done by an external monitoring hardware.

[1850] BG_PowerOff State

[1851] The voltage is below a certain threshold for proper operationHalt of all BG internal clocks

[1852] The BG must not drive any pins

[1853] BG_PowerOn State

[1854] The voltage level is above a threshold to guarantee a definedstate of the pins

[1855] BG_HWReset State

[1856] All clocks halt immediately

[1857] The BG must not drive any pins

[1858] BG_Operating State

[1859] The BG supports regular function

[1860] BG_Awake State

[1861] BG_SoftReset State

[1862] Enabling of the BD transmitter for an ongoing frame transmissionwill be hold, afterwards immediately halt of BG internal clocks exceptthose that are needed for operating the host interface and disabling ofthe BD.

[1863] BG_Normal State

[1864] Regular function is supported

[1865] BG_Standby State

[1866] The power consumption of the BG is significantly reduced comparedto BG_Normal

[1867] All BG clocks off except those that are needed for operating thehost interface

[1868] Configuration data will be held

[1869] An explicit shutdown support for the BG is not required.

[1870] BG State Diagram

[1871]FIG. 70 shows a Bus Guardian (BG) state transition diagram. Table19 is a BG state transition table. TABLE 19 BG State Transition Table.State Transition Direction Action taken on Transition From State ToState Conditions for Transition Transition V1 BG_PowerOff BG_PowerOn BGSupply voltage raises above BG_U1 V2 BG_PowerOn BG_PowerOff BG Supplyvoltage drops below BG_U2 L1 BG_HWReset BG_Operating CC external resetAfter hard reset signal is inactive (power-up reset or (AND) Supplyvoltage is via dedicated reset opt. greater than BG_U3 pin) allinitialization for at least BG_t_(v3) data are cleared L2 BG_OperatingBG_HWReset External reset disable ability to signal is active drivepins, all clocks (OR) Supply voltage halt immediately opt. drops belowBG_U4 for at least BG_t_(v4) L3 BG_Operating BG_SoftReset A BG_Reset isThe ongoing requested by the guarding action will host be finished andthe configuration data shall be retained L4 BG_SoftReset Initializationis finished L5 BG_SoftReset BG_Normal BG_Reset is The interrupt statusdeactivated by the shall be cleared host (AND) BG optional soft opt.checks are passed L6 BG_SoftReset BG_Standby Soft reset is Opt.deactivated AND BG optional soft checks did fail L7 BG_Awake BG_StandbyHost issues Sleep Command L8 BG_Standby BG_Awake Host issues Wake- upCommand

[1872] The constants BG_U1, BG_U2, BG_U3, BG_U4, BG_t_(v3) and BG_t_(v4)are product specific and have to be defined in the BG productspecification.

[1873] Note: BG_U1<BG_U3, BG_U2<BG_U4

[1874] HW States of the Active Star

[1875] Overview

[1876] The following overview describes the Active Star behavior invarious states. Conditions for entering and exiting these states aredescribed in the table following the subsequent state diagram.

[1877] ST_PowerOff State

[1878] The voltage is below a certain threshold for proper operation

[1879] The active star must not drive any pins

[1880] ST_PowerOn State

[1881] ST_Normal State

[1882] The voltage regulator is active

[1883] ST_Sleep State

[1884] The voltage regulator is off

[1885] Active Star State Diagram

[1886]FIG. 71 shows an Active Star state transition diagram. Table 20 isan Active Star state transition table. TABLE 20 Active Star StateTransition Table. Action State Transition Direction Conditions taken onTransition From State To State for Transition Transition V1 ST_PowerOffST_PowerOn ST Supply voltage raises above ST_U1 V2 ST_PowerOnST_PowerOff ST Supply voltage drops below ST_U2 L1 ST_Normal ST_Sleep STdid not detect and message-like patterns for more than ST_t_(s1) L2ST_Sleep ST_Normal ST has detected a valid wake-up symbol/pattern

[1887] The constants ST_U1, ST_U2 and ST_t_(s1) are product specific andhave to be defined in the star product specification.

[1888] Error Signaling and Error Handling

[1889] Error Signaling

[1890] This chapter describes the error signaling mechanisms of FlexRayprotocol. These mechanisms are intended to enable the host applicationor any other higher level software to learn about the presence ofunexpected protocol conditions. In some cases, the host may want to takeparticular action when being notified of certain types of errors. Thisprotocol specification, however, makes no requirement for the hostapplication to react to any of the error conditions described in thischapter.

[1891] Error signaling refers to the presentation of filtered and/orunfiltered protocol error condition information from the CommunicationController to the host.

[1892] Frame Reception and Validation

[1893] Several error signaling mechanisms described in this chapter makeuse of the status of the reception process of various frames by theframe processing portion of the protocol engine. Refer to the abovedescription for the details of these mechanisms and the signals theyprovide to the Error Signaling/Error Handling mechanisms.

[1894] Symbol Reception and Validation

[1895] Several error signaling mechanisms described in this chapter makerely on the detection of various protocol symbols by the symbolprocessing portion of the protocol engine. Refer to the abovedescription for the details of these mechanisms and the signals theyprovide to the

[1896] Error Signaling/Error Handling mechanisms.

[1897] Error Signals and Error Counters

[1898] This section describes the error signals and error counters ofthe FlexRay Protocol. Error signals are used to indicate a detectedfault to the host. Error counters are used to count faults, andinformation related to the number of faults is passed on to the host. Inall cases the error counters are not allowed to be incremented pasttheir maximum value, i.e., the counters shall not “wrap around” back tozero, but rather shall remain at their maximum value.

[1899] Table 21 and Table 22 list the error signals and error countersof the FlexRay protocol. The following sections provide detaileddescriptions of the various signals and counters. TABLE 21 Error Signalsand Error Counters for FlexRay Operating Mode Abbreviation Frame andChannel Status/Error Signals Channel Status and Error Information CSEIFrame Status and Error Information FSEI General Error Signals ColdstartCount Maximum Signal CCMS Missing Rate Correction Signal MRCS MissingOffset Correction Signal MOCS Clock Correction Limit Reached CCLRReference Frame too Early RFEE Reference Frame Lost RFLE Bus GuardianSchedule Monitor Error BGME Error Counters Clock Correction FailedCounter CCFC

[1900] TABLE 22 Error Signals for byteflight Operating Mode ErrorSignals Abbreviation SOC too Early SOCE SOC Lost SOCL Illegal PulseILLPIF

[1901] Frame Status and Error Information (FSEI)

[1902] A FlexRay Communications Controller shall provide aclassification of the slot status per channel for each slot that isbooked to receive a frame. A slot is booked to receive a frame if afilter (concerning frame ID, cycle counter and channel—see the followingdescription) for this slot is set.

[1903] Table 23 lists the possible status and error information for abooked slot. The determination of these statuses is based on thepresence or absence of certain frame reception status signals as definedin the sections above. TABLE 23 Error Signals Related to FSEI Setcondition: Frame processing Frame Status and produces any of thefollowing Static Dynamic Error Information signals Segment Segment ByteCoding S_HeaderCodingError Applies Applies Error/CRC ErrorS_InvalidHeaderCRCError S_FrameCodingError S_InvalidFrameCRCErrorS_InvalidDTSError S_ChannelIdleCodingError Slot Mismatch S_FrameIDErrorApplies Applies Cycle Counter S_CycleCountError Applies Applies MismatchLength Mismatch S_InvalidFrameLengthError Applies —S_PayloadLengthStaticError S_InvalidFrameLengthError — Applies NullFrame S_ValidStaticFrame and the Applies — fNullFrameIndicationBit isset in the frame. Empty Slot At the end of a booked Applies — slot noerror signal (i.e., S_HeaderCodingError, S_InvalidHeaderCRCError,S_FrameCodingError, S_InvalidFrameCRCError, S_InvalidDTSError,S_ChannelIdleCodingError, S_FrameIDError, S_CycleCountError,S_InvalidFrameLengthError, S_PayloadLengthStaticError) and no validframe signal (i.e., S_CorrectFrame or S_ValidStaticFrame) was signaledfrom frame processing and frame processing is currently in the FR_Idlestate Transmission S_TransmissionConflictError Applies Applies Conflict

[1904] Transmission Conflict is Only detected if the node tries to senda frame while it receives. The error signal belongs to the slot ID ofthe sent frame. If a receive buffer is configured to use the “pick firstvalid” style of channel filtering (see below), the following additionalinformation on the status of the channel that was not selected forpayload storage shall be summarized in the FSEI: TABLE 24 AdditionalFSEI Error Signals for “Pick First Valid” Channel Filtering Frame StatusSet condition: Frame processing and Error produces any of the followingStatic Dynamic Information signals Segment Segment Receive ErrorS_HeaderCodingError Applies Applies on Second S_InvalidHeaderCRCErrorChannel S_FrameCodingError S_InvalidFrameCRCError S_InvalidDTSErrorS_ChannelIdleCodingError S_FrameIDError S_CycleCountErrorS_InvalidFrameLengthError S_PayloadLengthStaticError Empty Slot At theend of a booked Applies — on Second slot no error signal Channel (i.e.,S_TSSError, S_HeaderCodingError, S_InvalidHeaderCRCError,S_FrameCodingError, S_InvalidFrameCRCError, S_InvalidDTSError,S_ChannelIdleCodingError, S_FrameIDError, S_CycleCountError,S_InvalidFrameLengthError, S_PayloadLengthStaticError) and no validframe signal (i.e., S_CorrectFrame or S_ValidStaticFrame) was signaledfrom frame processing and frame processing is currently in the FR_Idlestate

[1905] S_InvalidDTSError applies only during frame reception in thedynamic segment. Each slot booked to receive a frame has a correspondingFSEI. The FSEI shall be reset to zero when the CC performs the statetransition L5 or L6 of the HW state machine (see the previous chapter).The FSEI's shall begin to be updated once a CC successfully passed theprotocol startup phase (see above).

[1906] The FSEI is always updated once the receive frame processing isfinished (see above). The received data content shall only be providedto the data storage corresponding to the booked slot if none of theabove listed error information was set (if channel filter “pick firstvalid” is configured, at least one channel's FSEI lists no errorinformation). In all other cases, only the current FSEI shall beprovided to the data storage.

[1907] It shall be possible during configuration of the CC to define asubset of the FSEI components [Byte Coding/CRC Error, Slot Mismatch,Cycle Counter Mismatch, Length Mismatch, Null Frame, Empty Slot,Transmission Conflict, Receive Error on Second Channel, Empty Slot onSecond Channel] to be the trigger condition for an interrupt to thehost. This subset applies to all booked slots.

[1908] Channel Status and Error Information (CSEI)

[1909] A FlexRay Communications Controller shall provide an accumulatedclassification of the slot status of all frames received on a givenchannel. This implies that a FlexRay CC that supports communication ontwo channels shall provide two such sets of information. The ChannelStatus and Error Information (CSEI) summarizes the status of all framesreceived on the communication channel, including those frames which arenot booked and therefore have no corresponding data or status storage inthe CHI. Table 25 lists the contents of the CSEI and describes themapping of the frame and symbol processing status symbols describedabove. TABLE 25 Error Signals Related to CSEI Symbol Static DynamicError Condition Window Segment Segment Byte Coding S_HeaderCodingError —Applies Applies Error/CRC Error S_InvalidHeaderCRCErrorS_FrameCodingError S_InvalidFrameCRCError S_InvalidDTSErrorS_ChannelIdleCodingError Slot Mismatch S_FrameIDError — Applies AppliesCycle Counter S_CycleCountError — Applies Applies Mismatch LengthMismatch S_InvalidFrameLengthError — Applies —S_PayloadLengthStaticError S_InvalidFrameLengthError — — AppliesUnaccepted Unexpected symbol reception (in Applies Applies AppliesSymbol symbol window or even outside) Together with S_TSSError

[1910] S_InvalidDTSError applies only during frame reception in thedynamic segment. The CSEI is readable by the host via the ControllerHost Interface (CHI). All components of the CSEI shall be reset (forexample, all components set to zero) when the CC performs the statetransition L5 or L6 of the HW state machine (see above). The componentsof the CSEI shall begin to be updated once a CC successfully passes theprotocol startup phase (see above).

[1911] The components of the CSEI are updated upon the completion of theframe processing of each communication slot (see Chapter ‘FrameProcessing’). The components of the CSEI shall also be updated at thecompletion of symbol processing (see Chapter ‘Symbol Processing’).

[1912] If a CSEI component is already set due to an earlier update, thecomponent shall remain set. This allows the CSEI to report the aggregatestatus of all frames on the communication channel. All components of theCSEI shall be reset by a host read operation.

[1913] It shall be possible during configuration of the CC to define asubset of the CSEI components [Byte Coding Error/CRC Error, SlotMismatch, Cycle Counter Mismatch, Length Mismatch, Unaccepted Symbol] tobe the trigger condition for an interrupt to the host. This subsetapplies to all channels.

[1914] Coldstart Count Maximum Signal (CCMS)

[1915] The Coldstart Count Maximum Signal (CCMS) shall be set toindicate that the CC has reached the maximum number of allowed coldstartretries (see specification of coldstart in Chapter ‘Wakeup, Startup, andReintegration’). The CCMS follows the value of vCCMS. CCMS shall bereset to zero when the CC performs the state transition L5 or L6 of theHW state machine (see Chapter ‘Requirements for Hardware States’). TheCCMS is set to one only during protocol startup phase if vCCMS was set(see Chapter ‘Wakeup, Startup, and Reintegration’). Once set to one, theCCMS remains set until the CC performs the state transition L5 or L6 ofthe HW state machine next time.

[1916] Clock Related Error Signals and Counters

[1917] Startup Majority Missed Signal (SMMS)

[1918] The Startup Majority Missed Signal (SMMS) shall be set toindicate that the CC has received a set of sync frames during startupthat did not result in a majority of the sync frames agreeing with thelocal view of the system time (see Chapter ‘Wakeup, Startup, andReintegration’). The SMMS follows the value of vSMMS. The SMMS shall bereset to zero when the CC performs the state transition L5 or L6 of theHW state machine (see Chapter ‘Requirements for Hardware States’). TheSMMS is set to one if vSMMS was set in protocol startup phase.

[1919] Once set to one, the SSMS remains set until the host clears thissignal.

[1920] Missing Rate Correction Signal (MRCS)

[1921] The Missing Rate Correction Signal (MRCS) indicates the inabilityto calculate a clock synchronization rate correction value due to thelack of any matching pairs of sync frames in the even and oddcommunication cycles. The MRCS follows the value of vMRCS. MRCS shall beset if vMRCS was set by the clock synchronization mechanism (see Chapter‘Clock Synchronization’). In the dynamic media access mode the setcondition is given if the node has not received an even and an oddreference frame. Since the reference frame provides all timinginformation in a system operating in the dynamic media access mode, thenode providing the reference frame in such a system will never indicatean MRCS error.

[1922] The signal shall remain set to one until the clocksynchronization algorithm is able to compute a valid rate correctionterm and therefore resets vMRCS.

[1923] The MRCS shall be set to zero when the CC performs the statetransition L5 or L6 of the HW state machine (see Chapter ‘Requirementsfor Hardware States’).

[1924] During protocol startup phase MRCS shall be set to one if thesignal vMRCS was set by startup (see Chapter ‘Wakeup, Startup, andReintegration’). For non-sync nodes and for a sync node in listen-onlymode this signal indicates that a second pair of matching sync frames ismissing. The MRCS remains set to one until the host clears this signalor the protocol startup phase was passed successfully.

[1925] It shall be possible during configuration of the CC to definethat MRCS is a trigger of an interrupt to the host.

[1926] Missing Offset Correction Signal (MOCS)

[1927] The Missing Offset Correction Signal (MOCS) indicates theinability to calculate an offset correction value due to a lack of syncframes in an odd communication cycle by the clock synchronizationmechanism (see Chapter ‘Clock Synchronization’). The MOCS follows thevalue of vMOCS. MOCS shall be set if vMOCS was set by the clocksynchronization mechanism (see Chapter ‘Clock Synchronization’). In thedynamic media access mode this occurs if the node does not receive areference frame in an odd cycle. The node providing the reference framewill never indicate an MOCS error.

[1928] The signal remains set to one until the clock synchronizationalgorithm can compute a valid offset correction term and thereforeresets vMOCS.

[1929] The MOCS shall be set to zero when the CC performs the statetransition L5 or L6 of the HW state machine (see Chapter ‘Requirementsfor Hardware States’).

[1930] During protocol startup phase, the MOCS shall remain at itsinitial value. No update of this signal is possible until the nodesuccessfully exits protocol startup phase.

[1931] It shall be possible during configuration of the CC to definethat MOCS is a trigger of an interrupt to the host.

[1932] Clock Correction Limit Reached (CCLR)

[1933] The Clock Correction Limit Reached (CCLR) indicates an inabilityto apply a clock synchronization rate or offset correction because thecomputed correction has exceeded the limiting values. The CCLR followsthe value of vCCLR. The CCLR shall be set to one if the limit checks onthe rate and offset correction values indicate either or both of theseparameters are in the red region and vCCLR was set (see Section 0). TheCCLR signal shall remain set to one until the node is able to computerate and offset correction terms that are both in the green area andtherefore the clock synchronization mechanism resets vCCLR to zero. TheCCLR error signal shall also be set to zero when the CC performs thestate transition L5 or L6 of the HW state machine (see Chapter‘Requirements for Hardware States’).

[1934] Note that the red/green region determinations are performed aftertaking into account any external clock corrections provided by the host(see Section ‘External Clock Synchronization (Optional)’). Because ofthis, the vCCLR is based on the aggregate of the internal and externalclock correction terms (if any). As a result, a system that would notnormally experience CCLR due to internal clock synchronization (forexample, the reference node in a system operating in the dynamic mediaaccess node) may still experience such errors as a result of externalrate correction.

[1935] During protocol startup phase, the CCLR will be set to one if thevCCLR is set during protocol startup phase (see Chapter ‘Wakeup,Startup, and Reintegration’). CCLR signal remains set to one until theCC can compute valid rate and offset correction values and the protocolstartup phase was passed successfully and therefore vCCLR was reset tozero (see Chapter ‘Wakeup, Startup, and Reintegration’). CCLR can bereset to zero by the host before the end of protocol startup phase wasreached.

[1936] It shall be possible during configuration of the CC to definethat CCLR is a trigger of an interrupt to the host.

[1937] Clock Correction Failed Counter (CCFC)

[1938] The Clock Correction Failed Counter (CCFC, range [0 . . . 15])allows the host to monitor the duration of the inability of a node tocompute clock correction terms after the CC passed protocol startupphase. t shall be incremented by one at the end of any odd communicationcycle where either MOCS or MRCS is set. The CCFC shall be reset to zeroat the end of an odd communication cycle if neither the MOCS nor theMRCS are active. The CCFC stops incrementing at 15 (i.e., incrementingthe counter at its maximum value shall not cause it to “wraparound” backto zero). The CCFC shall be reset to zero when the CC performs the statetransition L5 or L6 of the HW state machine (see Chapter ‘Requirementsfor Hardware States’).

[1939] Summary

[1940] The following tables summarize the conditions and applicabilityof the various clock-related error signals and counters TABLE 26 ClockSynchronization Error Signals and Counters During CC_Normal Operationand CC_Passive Operation After an Triggered Every Even/Odd Errorby/Increment Communication Communication signal/counter condition CycleCycle Clock Correction MRCS or/and — Applies Failed Counter MOCS (CCFC)Missing Rate vMRCS set by — Applies Correction Signal clock (MRCS)synchronization Missing Offset vMOCS set by — Applies Correction Signalclock (MOCS) synchronization Clock Correction vCCLR set by — AppliesLimit Reached clock (CCLR) synchronization

[1941] TABLE 27 Clock Synchronization Error Signals and Counters DuringProtocol startup phase After an Triggered Every Even/Odd Errorby/Increment Communication Communication signal/counter condition CycleCycle Clock Correction not updated — — Failed Counter during protocol(CCFC) startup phase Missing Rate vMRCS set by — Applies CorrectionSignal startup (MRCS) Missing Offset not updated — — Correction Signalduring protocol (MOCS) startup phase Clock Correction vCCLR set byApplies Applies Limit Reached startup (CCLR) Startup Majority vSMMS setby — Applies Missed Signal startup (SMMS)

[1942] Bus Guardian Schedule Monitor Error (BGME)

[1943] The Bus Guardian Schedule Monitor Error (BGME) is used to signalthat the CC has detected that the static segment transmission patternenforced by the bus guardian does not match the static segmenttransmission pattern configured into the communication controller. TheBGME follows the value of the vBgsmError parameter defined in thedescription of the BG Schedule Monitoring (see Section ‘BG ScheduleMonitoring Service’).

[1944] The BGME shall be set to zero when the CC performs the statetransition L5 or L6 of the HW state machine (see Chapter ‘Requirementsfor Hardware States’). The BGME shall be set to one whenevervBgsmError=TRUE (see specification in Chapter ‘Bus Guardian Interface’).(For the behavior during protocol startup phase, please refer to Chapter‘Bus Guardian Interface’ as well).

[1945] BGME shall be set to zero as soon as the host acknowledges the BGschedule mismatch by an active acknowledgement via the signalvBgsmErrorAck (see Chapter ‘Bus Guardian Interface’).

[1946] Certain systems do not make use of the BG Schedule monitoringservice. There is no requirement for the CC to provide a mechanism toallow this service to be disabled—non-applicable results must be ignoredby the host.

[1947] It shall be possible during configuration of the CC to definethat BGME is a trigger of an interrupt to the host. TABLE 28 ErrorSignals Related to BG Schedule Monitoring Error Static Dynamicsignal/counter Triggered by Segment Segment Bus Guardian ScheduleVBgsmError = TRUE Applies Applies Monitor Error (BGME)

[1948] Error Signals Related to SOC/ILLPIF (byteflight Mode)

[1949] The following error signals may be used to allow the host tomonitor the status of the periodic SOC symbol and to detect theoccurrence of illegal pulses instead of SOC symbols for systemsoperating in the byteflight media access mode. In byteflight mode thebyteflight master CC controls the communication schedule by its SOCsymbol and therefore the following error signals are not applicable to anode operating as the byteflight master.

[1950] SOC Early

[1951] This error signal shall be set if the end of a correct SOC(symbol passed the check set “ValidSOC”) occurs before gdCycleMin. Thiserror signal is reset by a host read operation.

[1952] SOC Lost

[1953] This error signal shall be set if the end of a valid SOC does notoccur before gdCycleMax (no symbol passed the check set “ValidSOC”before gdCycleMax). This error signal is reset by a host read operation.

[1954] Illegal Pulse Error (ILLPIF)

[1955] This error signal shall be set if either of the followingconditions are met

[1956] gdCycleMin has not expired since the last valid SOC symbol(symbol passed check set “ValidSOC”) and a sequence of logic “0” with aduration of between 21*gdBit and 29*gdBit or a duration of more than31*gdBit has been received, OR

[1957] gdCycleMin has expired since the last correct (valid) SOC symbol(symbol passed check set “ValidSOC”) and some bus activity wasrecognized other than a valid SOC symbol.

[1958] This error signal is reset by a host read operation. TABLE 29Error Signals related to SOC/ILLPIF in byteflight mode Byteflight StaticDynamic Error signal Triggered by mode Segment Segment SOC EarlyValidSOC before Applies — — gdCycleMin SOC Lost GdCycleMax withoutApplies — — ValidSOC ILLPIF Illegal Pulse before Applies — — gdCycleMinILLPIF Illegal Pulse instead Applies — — ValidSOC

[1959] Error Handling

[1960] Error handling denotes the behavior of the lower protocol layerswhen irregular protocol conditions have been detected. Depending on thenature and duration of the error condition, the protocol controllerenters certain states to deal with such conditions. In some cases,higher layer program command activity is required for the protocolcontroller to resume normal operation.

[1961] The error handling concept described in this document is intendedto ensure communication between non-affected nodes can be maintained inthe presence of a lower layer protocol error in a single node. It isalso intended to maintain communication when a host behaves in anon-optimal way in the absence of an error in the local lower layerprotocol.

[1962] Protocol Error States

[1963] The error handling mechanisms described here are aimedmaintaining communication as long as possible even in the presence oferrors.

[1964] The error handling is based on three error states with anassociated fault hypothesis and an associated strategy for the nextsteps (behavior) of the CC (see Table 30). These error states correspondto a traffic light model [green, yellow, red]. TABLE 30 Protocol ErrorStates [Green, Yellow, Red] State Activity Green CC: full operation.CHI: error signals might be set indicating a detected fault (Errors havebeen detected, but they are still consistent with the fault hypothesisimplicit in the green state.). Frame processing: Normal operation. BG:remains synchronized with the CC. Fault Hypothesis: CC external faults,such as electro- magnetic interference, are assumed to be much moreprobable than CC internal faults. The BG is assumed to be functional andwould prevent schedule violation of its CC. Strategy: The strategy is tostay fully synchronized and support the cluster wide clocksynchronization. No immediate effect on protocol operation by a detectederror assumed. The host is just informed of any error condition(s) byerror signaling. Yellow CC: reduced operation - no frame transmissionand no active contribution to the cluster wide clock synchronization.CHI: error signal(s) set indicating a detected fault. Frame processing:The CC stops transmitting frames, but received frames are stillprocessed. Clock synchronization mechanisms are continued based onreceived frames. BG: Remains synchronized as the CC continues to providethe ARM, MT, and BGT signals. Fault Hypothesis: An external or internal(CC-related) fault is assumed to be present. The fault causing the errorwas non-fatal - only partial defects in registers, memory or CC logic isassumed. The clock synchronization of the CC may not be workingcorrectly. As a consequence, it is possible that both the CC and its BGcould follow an incorrect macrotick over several cycles and thereforethe BG no longer prevents schedule violations of its CC. Strategy: TheCC shall process incoming frames but shall stop sending frames. Once theCC reaches clock agreement with other CCs it may resume normal operationwithout host intervention. Red CC: Operation halted - no receive frameprocessing and clock synchronization processing shall take place. Allsignals to the bus driver and bus guardian are set to their definedstates. CHI: error signaling for detected error(s). Access to the CHIshall be possible for the host. Frame processing: All signals to the busdriver and the bus guardian shall be frozen at their last states. BG: BGwill enter FailSilent state due to lack of transitions of the ARM, MT,or BGT signals. Fault Hypothesis1: An internal (CC related) fault hashappened, e.g. internal parameter check(s) failed. Fault Hypothesis2:The CC was not able to self-rescue based on theyellow fault hypothesisand a fatal fault shall to be assumed. Strategy: CC shall disable anytransmissions. A reset from the host isrequired to resume operation.

[1965] Overview of Transitions in the FlexRay Error State Machine

[1966] The following sections and tables summarize the requiredrelations between the error signals, the values of the error countersand the transitions within the protocol error states [green, yellow,red]. The states reflect the FlexRay error handling based on thethree-state fault hypothesis of the protocol. Section ‘Error Handlingfor TT-D and TT-M Protocol Modes’ covers the transitions during protocoloperation for the Time-Triggered Distributed Protocol Mode andTime-Triggered Master-Controlled Protocol Mode, and section ‘ErrorHandling for Protocol Operation in byteflight Protocol Mode’ covers thetransitions during protocol operation in the byteflight Protocol Mode.

[1967] Error Handling for TT-D and TT-M Protocol Modes

[1968] This section describes the central error handling mechanism forFlexRay nodes operating in the static, mixed, and dynamic media accessmodes. The protocol error state is set to green when the CC performs thestate transition L5 or L6 of the HW state machine (see Chapter‘Requirements for Hardware States’), independent of the configuredFlexRay mode (static, dynamic, or mixed).

[1969] If the CCFC value is less than gMaxWithoutClockCorrectionPassive(range [1 . . . 7]) then the error state shall be in green state, unlesssome other error causes a yellow or red state.

[1970] If the CCFC becomes equal to gMaxWithoutClockCorrectionPassivethe fault hypothesis of yellow state shall be assumed (unless some othercondition would cause the error state to be red). The clock correctionmight not work correctly and therefore the CC shall not send any frames.It is possible that also the BG is not synchronized to the cluster'sschedule. As long as CCFC does not reach gMaxWithoutClockCorrectionFatal(range [≧gMaxWithoutClockCorrectionPassive . . . 15]) the CC remains inthe yellow error state. If CCFC becomes reset again (see section 0), thegreen state shall become active, unless some other error causes a yellowor red state. The CC was able to resynchronize and is fully operational.

[1971] If the CCFC becomes equal to gMaxWithoutClockCorrectionFatal thefault hypothesis of the red state shall be assumed. The CC was not ableto resynchronize to the cluster. The CC shall only be reset by its host.The parameter gMaxWithoutClockCorrectionFatal is considered to be auser-defined threshold that is used to control the change of faulthypothesis and sets the threshold of when to change from yellow stateinto red state. If the node is configured withgMaxWithoutClockCorrectionPassive=gMaxWithoutClockCorrectionFatal thenthe node shall enter the red state as soon as the CCFC equals theircommon value. This configuration may be desirable for certain types ofsystems.

[1972] If the CCLR is set (see section 0) the CC shall immediately enterthe red protocol error state. The CC shall remain in the red state untilthe host resets the CC.

[1973] During protocol startup phase the CCLR shall not influence theerror handling mechanism.

[1974] The transitions described above are used in all FlexRay mediaaccess modes. The dynamic mode has some special situations, however. Inthe dynamic mode only one static slot with the purpose of sending thereference frame is defined and therefore the system operates in amaster/slave configuration. All CCs acting as slaves in the cluster haveto accept the reference frame and its content as the sole data sourcefor their clock synchronization algorithms. This results in a clocksynchronization algorithm that is based upon the receipt of just onesync frame (see Chapter ‘Clock Synchronization’). The mechanism itself,including rate and offset correction calculation, can deal with this(i.e., the single sync node case is just a special case of the generalclock synchronization algorithm). Therefore nodes operating in thedynamic media access mode shall use the same clock synchronization errorhandling mechanisms as would be used in the other media access modes. AnMRCS on such a system means that the even and/or odd reference frame wasmissing and no rate correction value could be calculated. An MOCS meansthat no odd reference frame was received and no offset correction termcould be calculated. The CCFC shall be incremented according itsspecification in section ‘Clock Correction Failed Counter (CCFC)’, andtherefore the error state machine shall follow the behavior definedabove. Special attention shall be given to the configuration of thevalues for gMaxWithoutClockCorrectionPassive andgMaxWithoutClockCorrectionFatal. As defined, a slave will stop sendingany data frame as soon as it enters the yellow state.

[1975] The same is true for the limit checks at the slaves. If thereference frame deviates too much from the slave's local view of theglobal time and invalid correction activity (in rate and/or offset)becomes necessary, the CCLR signal shall be set and the protocol errorstate machine shall move into the red state.

[1976] As the master CC controls the timing of the complete cluster byits reference frame no error handling activity concerning CCFC shallinfluence the master CC during normal operation (see Chapter ‘ClockSynchronization’). The error handling of the master node shall only beinfluenced by the CCLR signal if external clock synchronization isapplied. The external rate and/or offset correction values might resultin a limit violation of the rate and offset correction values (seeChapter ‘Clock Synchronization’).

[1977] Table 31 summarizes the transitions for the static, mixed anddynamic media access modes. TABLE 31 Error Management State MachinesTransitions for Time-Triggered Distributed Protocol Mode andTime-Triggered Master-Controlled Protocol Mode State TransitionDirection Transition From State To State Conditions for Transition F1CC_SoftReset Green Soft reset released (L5 or L6 of Chapter‘Requirements for Hardware States’) F2 Green Yellow   ( CC in “ProtocolOperation Phase”     AND End of odd Cycle (after clock correctioncalculation)     AND CCFC = gMaxWithoutClockCorrectionPassive     ANDCCFC < gMaxWithoutClockCorrectionFatal     AND CCLR is not set   ) F3Red    CC in “CC in “Protocol Operation Phase” AND End of odd Cycle(after clock correction    calculation) AND ( CCLR set     OR CCFC =   ) gMaxWithoutClockCorrectionFatal F4 Yellow Red    CC in “ProtocolOperation Phase” AND End of odd Cycle (after clock correction   calculation) AND ( CCLR set    OR CCFC =    )gMaxWithoutClockCorrectionFatal F5 Green   ( CC in “Protocol OperationPhase     AND End of odd Cycle (after clock correction calculation)    AND CCFC has been set to zero     AND CCLR is not set   )

[1978]FIG. 72 shows an error management state transition diagram for thetime-triggered distributed protocol mode and for the time-triggeredmaster-controlled protocol mode.

[1979] Error Handling for Protocol Operation in byteflight Protocol Mode

[1980] This section describes the central error handling mechanism forbyteflight mode.

[1981] Each time the host gives the “clear command” while the CC is inconfiguration state the protocol error state is set to green. By thedefinition of in the byteflight specification (see M. Peller, J.Berwanger, and R. Greissbach, byteflight Specification, version 0.5, BMWCorporation 1999, available at http://www.byteflight.com), the receptionof an SOC is always the trigger to start a new communication cycle andthe CC starts operation (protocol startup phase is finished).

[1982] If a communication cycle is still ongoing and an SOC is received(SOC before gdCycleMin), a new communication cycle has to be started(the master sent the SOC and therefore has to be accepted by all nodes).The CC remains in the green state.

[1983] If a communication cycle is already finished and the next SOC ismissing (gdCycleMax has passed), the CC does not start a newcommunication cycle until the SOC is detected. Within that time, the CCremains passive (yellow state).

[1984] If an ILLPIF is detected instead of an SOC (between gdCycleMinand gdCycleMax) or even during an ongoing communication cycle, the CCenters the yellow state. The detection of an SOC causes the CC to switchinto green state anyway.

[1985] Table 32 summarizes the transitions for byteflight mode. TABLE 32Error Management State Machines Transitions for byteflight Protocol ModeState Transition Direction Transition From State To State Conditions forTransition B1 CC_SoftReset Green Soft reset released (L5 or L6 ofChapter ‘Requirements for Hardware States’) AND byteflight modeconfigured (gNumberofStaticSlots equal to zero) B2 Green Green SOCbefore gdCycleMin B3 Yellow    GdCycleMax reached without SOC OR   Illegal Pulse before gdCycleMin OR (    Illegal Pulse aftergdCycleMin AND Illegal Pulse before gdCycleMax ) B4 Yellow Green SOCreceived

[1986]FIG. 73 shows an error management state transition diagram for thebyteflight protocol mode.

[1987] Protocol Error State Signal

[1988] The host shall have the possibility to read the current protocolerror state (PESS, range [Green, Yellow, Red]) at any time.

[1989] It shall be possible during configuration of the CC to definethat a change within PESS is a trigger of an interrupt to the host.

[1990] Controller Host Interface

[1991] Introduction

[1992] Purpose and Scope

[1993] The purpose of this chapter is to describe the conceptualstructure and required functions and properties of the controller hostinterface that handles the control and data flow between the hostprocessor and FlexRay controller protocol engine.

[1994] The scope of is chapter reaches from the host processor interfaceto the protocol engine interface. FlexRay protocol functions are notdescribed.

[1995] Definitions, Acronyms and Abbreviations

[1996] This chapter and the following Chapter contain a number ofrequirements but also introductions, comments, explanations, etc. Allrequirements are documented in following format:

[1997] Requirement 1<text for requirement one>

[1998] Text in a different format does not constitute a requirement andis therefore not subject to conformance testing.

[1999] CHI elements—are the seven elements of the CHI: Host processorinterface, control data handling, status data handling, message datahandling, configuration data handling, CHI services, protocol engineinterface

[2000] Configuration data—is used to program a FlexRay communicationcontroller in order to communicate with other FlexRay controllers.Configuration data has a constant impact on the behavior of protocolimplementation during NormalOperation unless changed by the host. Thischaracteristic distinguishes the configuration data from the controldata that has only temporal impact during NormalOperation. Moreover thehost processor is the only source for configuration data.

[2001] Controller state—is the superset of protocol state and otherstates of the controller which are not determined by the protocol statemachine (e.g. HardReset state, Configuration, Standby, etc.)

[2002] Interrupt—is an event triggered by a FlexRay controller andpropagated to the host processor by a dedicated communication link inorder to indicate that a specific condition has become true in theFlexRay controller. Note that in interrupts are generated by the CHIelement Host interrupt service but its propagation to the host processoris controlled by the CHI element Status data handling.

[2003] Message memory—is memory that contains information contained in areceived frame or a frame that was or will be transmitted.

[2004] Message status memory—is memory that contains status informationabout a received or transmitted frame.

[2005] Message control field—is a field the host can use to control theuse of a message memory.

[2006] Message data—is a subset of data contained a FlexRay frame. Itdoes not include FrameID nor FrameCRC. It includes the following data:ReservedBits, NMIndicationBit, PayloadLength, HeaderCRC, CycleCount,FData[0 . . . 254].

[2007] NormalOperation—is the state where the controller can participatein or initiate the cluster communication by receiving or transmittingframes. This state includes the listen-only mode.

[2008] Status data—is all kind of data the controller determines withoutinteraction with the host by receiving information from the FlexRayPhysical Layer or Bus Guardian or by controller internal mechanisms.

[2009] Slot-channel tuples—determine the allocation of transmissionbandwidth on a specific channel and slot for transmission in the staticsegment. This is necessary as two controllers may share a singleslot—one for each channel.

[2010] Data blocks—are sets of data bytes which belong together, namelythe fNMVector, fData, fFrameID, fHeaderCRC, vStatusVector,vInterruptStatusVector

[2011] Static frame—is a frame with fFrameID smaller or equal togNumberOfStaticSlots

[2012] Dynamic frame—is a frame with fFrameID larger thangNumberOfStaticSlots

[2013] Application requirements—a set of requirements determined by aconcrete application or a group of similar applications

[2014] CC Configuration state—a state where the host can configure theFlexRay controller. Neither transmission nor reception is possibleduring this state. This state is not left unless the host explicitlyrequests the FlexRay controller to exit it.

[2015] HardReset state—the state entered automatically by the FlexRaycontroller after power has been turned on or after activation of adedicated hard reset trigger. After initialization of registers andmemories with default values the FlexRay controller automaticallytransits to the CC configuration state.

[2016] Controller state—is the combination of the protocol state withall states of state machines operating in parallel in a controllerimplementation.

[2017] Passive state—a state where the FlexRay controller does nottransmit any data but keeps receiving data. It also continues to performthe clock synchronization.

[2018] Freeze state—a state where the FlexRay controller does neithertransmit nor receive data, clock synchronization is stopped and all dataaccessible for host through the CHI remains constant unless a change isperformed by host itself.

[2019] Overview of the CHI

[2020] Conceptual Architecture

[2021] The controller host interface (CHI) manages the data and controlflow between the host processor and the FlexRay protocol engine.

[2022] Conceptually the CHI consists of seven CHI constituentcomponents. These are the host processor interface and the protocolengine interface, the four data handling units—status data handling,control data handling, message data handling and configuration datahandling—, and the CHI services. Note that the hardware architecture ofa controller implementation can be quite different than this conceptualarchitecture.

[2023]FIG. 74 illustrates the conceptual architecture of the controllerhost interface and its seven components. The components are described inSections ‘Host Processor Interface’ through ‘Protocol Engine Interface’and in Section ‘CHI Services’.

[2024] Host Processor Interface

[2025] The host processor interface provides the host processor withcontrol means and gives it access to data held in the four CHI datahandling units. In general, FlexRay does not enforce a particular way ofhow this interface is realized. It can be realized in different ways,for example, as a parallel processor bus or as serial communication linksuch as SPI.

[2026] Configuration Data Handling

[2027] The configuration data handling unit contains the functions andmemory required to handle and store the communication controller relatedconfiguration data. The configuration data written by the host processoris used to derive all configuration parameters required by the protocolengine. The protocol engine has to use protocol parameters as providedby this CHI element. The configuration data handling unit may alsoconduct sanity checks of the configuration data.

[2028] FlexRay distinguishes between two subsets of configuration data:

[2029] constant configuration data—may only be changed while the FlexRayprotocol is in the CC configuration state, it remains constant duringNormalOperation. The ability of the host to modify this data is disabledas long as transmission and/or reception on at least one communicationchannel is enabled.

[2030] variable configuration data—must be set by the host in the CCconfiguration state unless initialized with valid default values by theFlexRay controller. This data can be modified by the host at any timewhen the hard reset condition is not given e.g. also whenNormalOperation is active.

[2031] Note that configuration data has a constant impact on thebehavior of protocol implementation during NormalOperation unlesschanged by the host. This characteristic distinguishes constant as wellas variable configuration data from control data that has only temporalimpact during NormalOperation. Moreover, the host processor is the onlysource for configuration data, but control data may be affected by theprotocol engine as well (e.g., interrupt indicators are set by theprotocol engine but reset by the host).

[2032] Control Data Handling

[2033] This CHI element processes control commands from the hostprocessor. This CHI element also handles control commands for other CHIelements, e.g. for CHI services.

[2034] Status Data Handling

[2035] This CHI element collects status data from the protocol engineand CHI services, processes it and provides it to the host processor onrequest. It handles status data of messages. It propagates interruptrequests triggered by the Host interrupt service to the host processorinterface. It contains memory to store status data.

[2036] Message Data Handling

[2037] This CHI element transfers message data and provides it to thehost processor interface as well as to the protocol engine interface. Itcontains memory to store message data.

[2038] Memory associated with one message's data is called a messagebuffer. A message buffer that is configured to store data for frames tobe transmitted is called a transmit buffer. A message buffer that isconfigured to store data for received frames is called a receive buffer.

[2039] Note that this CHI element does not handle status data ofmessages.

[2040] Requirement 1: The FlexRay controller may not modify a transmitbuffer's content during NormalOperation nor during Configuration State.Note that the protocol engine may append the padding pattern to thepayload section of frames to be transmitted which contain more payloaddata than can be stored in the corresponding transmit buffer. This doesnot modify the transmit buffer's content.

[2041] Protocol Engine Interface

[2042] The protocol engine interface provides the protocol engine with ameans of control and gives it access to data held in the four CHI datahandling units. Moreover it allows the protocol engine to interoperatewith the CHI services. This interface is not visible to the host.

[2043] Requirement 2: The protocol engine interface shall provide atomicdata read operations, so that once a read operation is initiated thetransferred data is guaranteed not to be changed until the readoperation has concluded.

[2044] Requirement 3: The protocol engine interface shall provide atomicdata write operations, so that during a write operation to a memory cellof a CHI element no other CHI element can read an inconsistent valuefrom or write to this memory cell.

[2045] Note that the previous two requirements are necessary but notsufficient. For further message data handling requirements see below.

[2046] CHI States

[2047]FIG. 75 shows various Controller Host Interface (CHI) States.

[2048] CHI state transition triggers (Transitions W1 and W5 aredescribed in Table 13):

[2049] vconfigure in {TRUE, FALSE}

[2050] vWakeUp in {TRUE, FALSE}

[2051] vNormalOperation in {TRUE, FALSE}

[2052] vFreeze in {TRUE, FALSE}

[2053] vStandby in {TRUE, FALSE}

[2054] CHI state description:

[2055] HardReset state: Reached after the hard reset of the controllerwas triggered. Initializes controller with a default state.

[2056] Configuration state: Puts protocol engine in Configure state.Enables host processor to change configuration data. Sets all CHI statetransition triggers to FALSE.

[2057] WakeUp state: Sets vWakeup to FALSE. Puts protocol engine inWakeUpListen state. The protocol engine may transit to WakeUpSend state.State transitions to Configure state are described in Chapter ‘Wakeup,Startup, and Reintegration’.

[2058] NormalOperation state: Sets vNormalOperation trigger to FALSE. Onentry initializes controller internal states according to configuration,then triggers startup in protocol engine. Note that this state containsall protocol states where the protocol engine has an interaction withother FlexRay nodes via the FlexRay bus. Protocol state changes can berequested within this state, e.g. the protocol engine can be requestedto transit to Passive state in order to prepare further statetransitions (e.g. shutdown, standby, etc.).

[2059] Standby state: Sets vStandby trigger to FALSE. Puts controller ina low power mode. The minimal required functionality is that CHI is ableto detect when the host sets the vConfigure trigger.

[2060] Freeze state: Sets vFreeze trigger to FALSE. Stops anyinteraction of the protocol engine with other FlexRay nodes. Allprotocol parameters including the complete protocol state are frozen.This mode allows the host processor to perform diagnosis.

[2061] CHI Services

[2062]FIG. 76 shows vaious interactions of CHI services with CHIelements. CHI services receive data from the protocol engine aboutreceived and transmitted communication elements as well as about theprotocol and error status. They may use data stored in the status,control, message or configuration interface.

[2063] CHI services may affect data stored in the status, control ormessage interface. They may not affect data stored in the configurationinterface.

[2064] CHI services do not affect the protocol engine's operation,neither directly nor indirectly through one of status, control ormessage data handling elements.

[2065] General Requirements

[2066] Requirement 4: It shall be assured that the concurrent operationof CHI elements cannot cause deadlocks.

[2067] Requirement 5: In case of concurrent access of different CHIelements to shared CHI elements the host processor interface and theprotocol engine interface shall have priority over other CHI elements.

[2068] Requirement 6: In case of concurrent access of the host processorinterface and the protocol engine interface to shared CHI elements theprotocol engine interface shall have priority. An exception isRequirement 7 (Rationale:

[2069] Necessary in order to assure that timeliness of all protocolengine operations.).

[2070] Requirement 7: In case the host processor requests a protocolstate change to FreezeState or to ConfigurationState throughRequestStateChange it has priority over the protocol engine interface.

[2071] Requirement 8: The data bandwidth of communication within the CHIshall be fast enough to support 100% bus utilization on each of itschannels during NormalOperation of the protocol engine. Note that thisrequirement addresses only the internal communication of the CHI, so itis not affected by performance limitations of the implemented hostprocessor interface.

[2072] Assumptions and Dependencies

[2073] All assumptions and dependencies are documented where they apply.There are no additional general assumptions or dependencies.

[2074] Host Processor Interface

[2075] The following set of requirements must be met by everyinstantiation of the host processor interface.

[2076] Requirement 9: The host processor interface shall provide anatomic data read operation from memory cells such that once a readoperation is initiated by the host the transferred data is guaranteednot to be changed until the read operation has concluded.

[2077] Requirement 10: The host processor interface shall provide anatomic data write operation such that during a host processor writeoperation to a memory cell of a CHI element no other CHI element canread an inconsistent value from this memory cell.

[2078] Note that the previous two requirements are necessary but notalways sufficient for consistent data access, e.g. for message bufferaccess further mechanisms are necessary (see section ‘Message DataHandling Interaction’).

[2079] Requirement 11: The host processor interface shall provide atleast one dedicated interrupt signal.

[2080] Requirement 12: The host processor interface shall trigger aninterrupt request to the host processor via the interrupt signalwhenever requested by the status data handling.

[2081] It is also possible to provide a FlexRay communication controllerwith multiple host processor interfaces. If a FlexRay controllerimplementation supports multiple instances of host processor interfaces(e.g. a parallel bus and a serial communication link or differentmultiple parallel busses) then the following additional two requirementsapply:

[2082] Requirement 13: A mechanism shall be provided that allows theselection of exactly one host processor interface instance before thecommunication between FlexRay controller and host processor begins.

[2083] Requirement 14: A change of this selection shall become effectiveonly by putting the FlexRay controller in HardReset state. If theselection changes during other states (except PowerOff state or Standbystate.) it may not result in a change of the host processor interface.

[2084] Configuration Data Handling Interaction

[2085] Relationship Between Configuration Data and Protocol Parameters

[2086] In a FlexRay controller the configuration data will usually becomprised of a set of registers and memories. However there is notnecessarily a one-to-one mapping between this set and the protocolparameters it determines. This is the case because there are protocolparameters, which can be derived from other protocol parameters.Moreover, a FlexRay controller may require parameters in a differentrepresentation than specified further on (Example: pSamplePeriod[ns]=gdBit [ns]/pSamplesPerBit)).

[2087] Configuration Data Handling Requirements

[2088] Interaction with the configuration data handling must meet thefollowing requirements

[2089] Requirement 15: Configuration data shall not be changed by theFlexRay controller except as result of the activation of hard resettrigger or after power has been applied.

[2090] It is assumed that the host in any case will have means todetermine whether a mechanism such as “HardReset” have modifiedconfiguration data. Moreover, no protocol mechanism will ever change anyconfiguration data under any circumstance.

[2091] Requirement 16: After activation of the hard reset or after poweron the configuration data shall be initialized by configuration datahandling with default configuration values assuring that the FlexRaycontroller does not transmit data on the FlexRay bus. When the hostprocessor requests a state change to NormalOperation without changingany configuration data no data may be transmitted on the FlexRay busindependent of the resulting protocol state. Rationale: This is a failsilence requirement for the case of a fault causing a hard reset orpower up where the host would not write any configuration data.

[2092] Requirement 17: Configuration data shall be designed in a waythat all protocol parameters are determined unambiguously.

[2093] Requirement 18: Configuration data shall be designed in a waythat all protocol parameters are determined with at least the resolutiongiven further on. The resolutions and units of all configuration datashall be done in a way that all this resolution is achieved for allvalid configurations.

[2094] Requirement 19: It shall be assured that the FlexRay controllernever transmits more than one sync frame per communication cycle, evenwhen the host has attempted to configure the FlexRay controller to doso. The FlexRay controller shall employ special measures to prevent thisfrom happening.

[2095] Requirement 20: At least the following parameters shall bedetermined by constant configuration data:

[2096] 1. All cluster constants (This covers several parameters, e.g.gdStartup, gStartupNoise, etc.)

[2097] 2. All node constants (This covers several parameters, e.g.pdWakeupPattern, etc.)

[2098] 3. Timing parameters

[2099] 4. In case pSyncNode is TRUE the value of pSyncSlot

[2100] 5. Frame identifiers, transmission channels and cycle counterfilters of all static frames that may be transmitted (Note that thisdeals only with configuration data and determines which slot-channeltuples are allocated for transmission by one FlexRay Controller. It doesnot imply that message memory is provided in the message data handlingelement for every slot-channel tuple.)

[2101] 6. Physical layer (optical or electrical), encoding

[2102] Requirement 21: The host shall have write access to constantconfiguration data only when the protocol is in the CC configurationstate. When the protocol is in any other state this data shall be writeprotected against access by the host processor.

[2103] Requirement 22: Appropriate mechanisms shall be provided thatsupport changes of variable configuration data during NormalOperation.These mechanisms shall ensure that the subset of configuration data tobe changed is not used by the protocol engine during the duration of thechange process. Indirectly this requires a locking mechanism for allcases where an atomic change is not possible.

[2104] Requirement 23: Variable configuration data shall be clustered inconfiguration subsets of configuration data belonging together in a waythat that an update of one subset cannot cause an inconsistentconfiguration during or after the update.

[2105] Requirement 24: At least the following parameters are determinedby variable configuration data

[2106] 1. Frame identifiers of messages in the dynamic segment

[2107] 2. vColdStartInhibit

[2108] Requirement 25: The following parameters shall be determined byexactly one of variable configuration data or constant configurationdata.

[2109] 1. (currently no parameter identified for this category)

[2110] Requirement 26: The host shall have read access to allconfiguration data in all controller states except PowerDown state andHardReset state.

[2111] Control Data Handling Interaction

[2112] Control of Protocol Parameters

[2113] Requirement 27: Means shall be provided to determine and changethe following protocol parameters during NormalOperation state:

[2114] 1. vOffsetCorrectionExtern, vRateCorrectionExtern

[2115] 2. vBgsmErrorAck (Can be discarded if locked parameter is usedfor BgsmError)

[2116] 3. vColdStartInhibit

[2117] Control Commands For the Host Processor

[2118] Requirement 28: At least the following control commands shall beprovided to the host processor: (TBD wording)

[2119] 1. ChangeControllerState (handles superset of changes to protocolengine interface—maybe better ChangeControllerState to covernon-protocol state changes as well)

[2120] 2. EnableInterrupt (<interrupt_type>)

[2121] 3. DisableInterrupt (<interrupt_type>)

[2122] 4. EnableCHIService (<CHI_service>, <CHI_service_feature>)

[2123] 5. DisableCHIService (<CHI_service>, <CHI_service_feature>) TABLE33 ChangeControllerState ChangeControllerState(<requested_controller_state>) Purpose Control command for the hostprocessor to requests a change of the controller state Argumentsrequested controller state <requested_controller_state> [HardResetstate, CC Configuration state, NormalOperation state, Freeze state,Wakeup state, Standby state] Return values None Operation Depending onthe requested controller state a request is generated to the protocolengine through the ChangeProtocolState interface. The CHI waits for theprotocol engine to perform the requested state transition. Subsequentlythe appropriate CHI state trigger is set to TRUE.

[2124] TABLE 34 Impact of Controller State Change on Protocol Engine andCHI (The maximum latency is before entering the state assuming that therequested transition is legal; the maximum latency in the controllerstate NormalOperation depends on the performance of controllerimplementation; this assumes that controller internal states must beinitialized depending on configuration.) Requested Argument forcontroller ChangeProtocol Maximum state State CHI state trigger latencyFreeze Freeze Sets vFreeze to TRUE 100 ns Configuration ConfigurationSets vConfiguration to 100 ns TRUE Standby Freeze Sets vStandby to TRUE100 ns Normal Normal Sets vNormalOperation 150 us Operation Operation toTRUE WakeUp WakeUpListen Sets vWakeup to TRUE 100 ns

[2125] Note that Table 34 is not subject to conformance testing.Specific FlexRay controller implementations may have deviating maximumlatency values. However, these values must be determined, documented andconstant. TABLE 35 EnableInterrupt/DisableInterrupt (Further interrupttypes may be supported but are not required) EnableInterrupt(<interrupt_type>)/ DisableInterrupt (<interrupt_type>) PurposeEnable/disable specific interrupts Arguments interrupt type toenable/disable<interrupt_type> <interrupt_type> [RXInterrupt,TXInterrupt, ErrorSignalingInterrupt] Return values None

[2126] TABLE 36 EnableCHIService/DisableCHIService EnableCHIService (<CHI_service>, <CHI_service_feature> ) DisableCHIService (<CHI_service>, <CHI_service_feature> ) Purpose Enable/disable optionalCHI services and CHI service features Arguments interrupt service; if<CHI_service_feature> equals “ALL” enable/disable complete service withall features <CHI_service> [message_filtering, message_FIFO,network_management, timer, error_signaling, symbol_handling,host_interrupt, optical_diagnosis] CHI service feature toenable/disable; if the CHI service does not have features or allfeatures should be enabled/disabled use “ALL” <CHI_service_feature>[ALL, frame_ID_filtering, channel_filtering, cycle_counter_filtering,message_ID_filtering, receive_FIFO, NM_vector_extraction,NM_function_filtering, media_access_test_symbol_handling,status_symbol_handling, timer_interrupt, error_signaling_interrupt,NM_function_interrupt] Return None values

[2127] Status Data Handling Interaction

[2128] Status data is derived from controller internal state variableswhich serve as their source. There are two types of status data:

[2129] 1. Free status indicators that can change their value whenevertheir source values change. Unless differently stated all indicatorsbelow are free status indicators.

[2130] 2. Locked status indicators that change their value if a specificcondition of the source value is fulfilled for a short time (typicallyin the range of one to several controller clock cycles) and keep thisvalue even if the condition is no more fulfilled.

[2131] Some status indicators may be combined in a super state which maynot be accessible by one atomic host operation. Likewise for statusindicators which are too large to be accessed by an atomic readoperation. Dedicated status consistency mechanisms may be required toassure that they can be read consistently by the host processor with anon-atomic sequence of read operations.

[2132] Requirement 29: Free status indicators shall be read-only for thehost processor. Attempts by the host processor to overwrite free statusindicators may not affect them.

[2133] Requirement 30: Locked status indicators shall be set if aspecific internal state is reached, they shall not be set upon requestof the host processor.

[2134] Requirement 31: Locked status indicators shall be reset only uponrequest of the host processor, they shall not be reset upon change ofthe adjacent internal state.

[2135] Requirement 32: All status indicators shall be reset upon exitfrom the CC configuration state.

[2136] Requirement 33: The current controller state shall be provided onread request of the host.

[2137] Requirement 34: The current error status vector shall be providedon read request of the host.

[2138] Requirement 35: A mechanism shall be provided that enables thehost to read the protocol state consistently.

[2139] Requirement 36: A mechanism shall be provided that enables thehost to read the error status vector consistently.

[2140] Requirement 37: If a host interrupt is generated by the hostinterrupt service, and if this interrupt is enabled, it shall beindicated to the host processor interface.

[2141] Requirement 38: Interrupts that are disabled shall not bepropagated to the host processor interface.

[2142] Requirement 39: The status data handling shall provide amechanism for the host processor to selectively enable and disable eachinterrupt.

[2143] Requirement 40: A dedicated status indicator shall be providedfor each receive buffer to indicate when a receive buffer is updatedthrough the PutFrame interface.

[2144] Requirement 41: The following protocol variables shall beprovided (sets of status data belonging together are combined in onebullet):

[2145] 1. vColdStartCount

[2146] 2. vValidSyncCount

[2147] 3. vCycle, vMacrotick, vCurrentSlot, vErrorHandlingLevel

[2148] 4. results of BG monitor checks

[2149] 5. results of Media Access Test

[2150] Requirement 42: The following results of the clocksynchronization algorithm which is performed during NIT of cycle n shallbe provided throughout cycle n+1 and cycle n+2

[2151] 1. vOffsetCorrection, vRateCorrection

[2152] 2. an indicator for impossible rate or offset correction termcalculation

[2153] 3. number of sync frame pairs used for the last clock correctionterm calculation

[2154] Requirement 43: A startup status vector shall be providedcontaining

[2155] 1. An indicator set only when vColdStartMax is equal togColdStartMax

[2156] 2. An indicator that plausibility check has failed

[2157] 3. An indicator that normal state was entered via coldstart path

[2158] 4. An indicator that coldstart path has been entered due toexpiration of pStartupNoise

[2159] Requirement 44: For each receive buffer a corresponding statusvector shall be provided containing at least the following statusinformation

[2160] 1. Semantically valid frame received

[2161] 2. Syntactically correct null frame received

[2162] 3. Syntactically correct sync frame received

[2163] 4. Empty slot—idle was detected throughout the slot on thereception channel

[2164] 5. Cycle counter mismatch detected

[2165] 6. Length mismatch detected (PayloadLength in static frame doesnot match gPayloadLengthStatic)

[2166] Requirement 45: The status vector for a receive buffer shall beupdated whenever this buffer is selected by the message selectionprocess. (Note that this does not imply that the receive buffer's datais updated as well.)

[2167] Requirement 46: A locked indicator shall be set on detection of awakeup pattern, that is, when the flag vWakeupSymbolReceived is set.

[2168] Requirement 47: A locked indicator shall be set whenvWakeupFrameHeaderReceived is set.

[2169] Requirement 48: A locked indicator shall be set when the flagvWakeupFailed is set.

[2170] Requirement 49: A locked indicator shall be set when the flagvWakeupComplete is set.

[2171] Message Data Handling Interaction

[2172] The host can book a slot-channel tuple for transmission. Notethat the booking does not include further conditions like subscription(e.g. cycle counter filtering) even though transmit buffers may supportadditional conditions to determine which data is transmitted during thebooked slot-channel tuples. The booking of a specific slot-channel mustbe unique in the cluster. The host can also subscribe a slot-channeltuple for reception. Depending on the FlexRay controller implementationthe subscription may include further conditions e.g. a matching cyclecounter, etc. Identical subscriptions may coexist in the same cluster.

[2173] Requirement 50: In order for the host to manipulate the contentof message buffers at least the following interface functions shall besupported (Further interface functions may be supported to improveefficiency):

[2174] GetMessage

[2175] PutMessage TABLE 37 GetMessage GetMessage ( <message_buffer>)Purpose Interface function for the host processor to retrieve data froma (receive) message buffer. Arguments Select the message buffer<message_buffer> (values depend on controller implementation) Returnvalues TRUE if the selected message buffer contains valid data, FALSEotherwise <valid_data> [ TRUE | FALSE ] Received message data<message_data> (FrameID, ReservedBits, SyncBit, NMIndicationBit,CycleCount, PayloadLength, HeaderCRC, FData[0..254]) (Does not containFrameCRC)

[2176] TABLE 38 PutMessage PutMessage ( <message_buffer>, <message_data>) Purpose Interface function for the host processor to change a(transmit) message buffer's content Arguments selected message buffer<message_buffer> (values depend on controller implementation) data to beput in the selected message buffer <message_data> (ReservedBits,NMIndicationBit, PayloadLength, HeaderCRC, FData[0..254]) (Does notcontain SyncBit; also FrameID is determined by message buffer's adjacentslot-channel tuple) Return None values

[2177] Requirement 51: The host shall have read access to all messagebuffers with valid message data. The Message data may not be valid whilethe message buffer is accessed by the protocol engine.

[2178] Requirement 52: An indicator shall be provided for each receivemessage buffer if it contains data of a semantically valid frame.

[2179] Requirement 53: After activation of the hard reset or after poweron this indicator shall be initialized by message data handling toindicate that the receive message buffer does not contain data of asemantically valid frame.

[2180] Requirement 54: A mechanism shall be provided that ensures accessto consistent message data by the host. This means that while the hostis accessing a message buffer's data that data shall not be changed byother CHI elements.

[2181] Requirement 55: Transmit buffers shall contain the followingdata: ReservedBits, NMIndicationBit, FrameID, PayloadLength, HeaderCRC,CycleCount, FData[0 . . . pMaxPayloadLength−1]

[2182] Requirement 56: In case of a request through the GetFrameinterface by the protocol engine cPaddingValue shall be set inFData[pMaxPayloadLength . . . PayloadLength−1] in case pMaxPayloadLengthis smaller than PayloadLength and <frame_data_found> is TRUE. Thepadding feature shall be supported only by controller implementationsthat have message buffers which cannot store 254 bytes of payload data.It shall be possible to inhibit padding by a dedicated configurationparameter.

[2183] Requirement 57: A mechanism shall be provided for the host tocommit transmit buffers for scheduling for transmission.

[2184] Requirement 58: The host shall have write access to transmitbuffers only when they are not scheduled for transmission.

[2185] Requirement 59: The host shall not have write access to receivebuffers.

[2186] Requirement 60: Each receive buffer shall provide the followingmessage data:

[2187] ReservedBits, NMIndicationBit, NullFrameIndicationBit, SyncBit,FrameID, PayloadLength, HeaderCRC, CycleCount, FData[0 . . .pMaxPayloadLength−1], reception channel. (Note: If the reception channelis determined by configuration data the reception channel is notrequired to be stored in the receive buffer.)

[2188] Requirement 61: Receive buffers shall be updated by the protocolengine only with data of semantically valid frames.

[2189] Requirement 62: The message data of valid frames that are storedin a receive buffer shall be accessible through GetMessage in the samesequence as the frames are detected as valid.

[2190] Requirement 63: For valid static frames received in slot x theearliest possible access to the message data through GetMessage shall bewithin 1 μs after the end of slot x if they are subscribed.

[2191] Requirement 64: For valid dynamic frames which end in minislot xthe earliest possible access to the message data through GetMessageshall be within 1 μs after the end of minislot x if they are subscribed.

[2192] Protocol Engine Interface

[2193] Communication With Protocol Engine TABLE 39 Protocol EngineInterface Interface type Interface function Purpose controlRequestStateChange Request a protocol state change at the protocolinterface engine data PutFrame Service for the protocol engine toprocess received interface frames GetFrame Service for the protocolengine that provides frame data for a specific slot and channel.PutProtocolState Service for the protocol engine to process protocolstate data PutErrorStatusVector Service for the protocol engine toprocess the error status vector GetConfigurationData Service for theprotocol engine to read configuration data

[2194] The protocol engine interface is split into a control and a datainterface. The control interface is used to request a protocol statechange at the protocol engine (see below). The data interface providesservices which can be requested by the protocol engine. These servicesare described further on.

[2195] RequestStateChange TABLE 40 RequestStateChange RequestStateChange( <requested_protocol_state> ) Purpose Request a protocol state changeat the protocol engine Arguments requested protocol state<requested_protocol_state> [ PowerUp, Configuration, Wakeup,NormalOperation, Passive, Freeze ] Return None values

[2196] Operation: The state change request is propagated to the protocolengine. It is in the responsibility of the protocol engine to reactaccordingly, e.g. some state change requests have to be followedimmediately while others allow to complete an ongoing transmit orreceive process. The protocol engine confirms the request by using thePutProtocolState interface to report its transition to the requestedstate.

[2197] PutFrame TABLE 41 PutFrame PutFrame ( <frame_data>, <RX_channel>,<frame_status> ) Purpose Service for the protocol engine to processreceived frames Arguments Data content of the received frame<frame_data> ReservedBits, NMIndicationBit, NullFrameIndicationBit,SyncBit, FrameID, PayloadLength, HeaderCRC, CycleCount, FData[0..254]Reception channel <RX_channel> [ A | B] Result of the frame checksperformed by the protocol engine - any combination of error values ispossible <frame_status> [ CorrectFrame | { CRCMismatch, IllegalLength,CycleCountMismatch, FrameIDMismatch, IllegalNMIndicationBit,IllegalSyncBit} ] Return values none

[2198] Operation: The data provided by the protocol engine is forwardedto all CHI services and to message data handling. These CHI elementsinteract with each other to determine

[2199] if the provided data should be stored in the message datamemory—if so determine the storage location

[2200] if reception of this very message should be indicated to hostprocessor (e.g. via interrupt)

[2201] if pMaxPayloadLength is smaller than PayloadLength discardFData[pMaxPayloadLength . . . PayloadLength−1], however do not changePayloadLength (Consequently a message buffer may contain less FrameDatathan indicated by PayloadLength.)

[2202] if and which status data to be updated

[2203] if there is an impact on control data (e.g. reset an indicatorset by the host if it has read a specific message)

[2204] if in case of an error indication maybe an interrupt should betriggered

[2205] others depending on further CHI services

[2206] GetFrame TABLE 42 GetFrame GetFrame ( <FrameID>, <TX_channel> )Purpose Service for the protocol engine that provides frame data for aspecific slot and channel. Arguments FrameID of the frame to betransmitted; 0 for construction of a special collision avoidance frameduring startup <FrameID> [0..cMaxFrameID] Channel to transmit the frame<TX_channel> [ A | B ] Current cycle counter <cycle_counter> [0..63]Return values TRUE if valid frame data was found, FALSE otherwise<frame_data_found> [ TRUE | FALSE ] TRUE if the configuration datacontains at least one message configuration with a matching <FrameID>for transmission on <TX_channel> <slot_is_booked> [ TRUE | FALSE ] Framedata to be transmitted <frame_data> (ReservedBits, SyncBit,NMIndicationBit, PayloadLength, HeaderCRC, FData[0..254]) (Not all datacontained in a frame is covered by this data set: FrameID, CycleCountand FrameCRC are known or generated by the protocol engine.)

[2207] Operation: The protocol engine requests frame data through thisinterface for every slot and channel.

[2208] If no slot-channel tuple for transmission is contained in theconfiguration data the value of <slot_is_booked> shall be FALSE and theprotocol engine will try to receive a frame.

[2209] If a slot-channel tuple for transmission is contained in theconfiguration data, though, <slot_is_booked> shall be TRUE, and a frameor null frame will be transmitted if <frame_data_found> is TRUErespectively FALSE.

[2210] In case both <slot_is_booked> and <frame_data_found> are TRUEmessage data handling assures that cPaddingValue is set inFData[pMaxPayloadLenth . . . PayloadLength−1] in case pMaxPayloadLengthis smaller than PayloadLength.

[2211] PutProtocolState TABLE 43 PutProtocolState PutProtocolState (<current_protocol_state> ) Purpose Service for the protocol engine toprocess protocol state data Arguments Current protocol state<current_protocol_state> [PowerUp, Configuration, Wakeup,NormalOperation, Passive, Freeze ] Return values none

[2212] Operation: This interface is used by the protocol engine wheneverthe protocol state changes. This information is provided to all CHIservices, status data handling, which interact accordingly to

[2213] Determine if a the state change needs to be reflected in statusdata

[2214] Determine if control data needs to be updated (e.g. reset/setspecific state change or transmission requests

[2215] Check if interrupt requests should be triggered

[2216] PutErrorStatusVector TABLE 44 PutErrorStatusVectorPutErrorStatusVector ( <error_status_vector> ) Purpose Service for theprotocol engine to process the error status vector Arguments Currentprotocol error status vector <error_status_vector> Error statusaccording to Chapter <Error Signaling and Error Handling> Return valuesnone

[2217] GetConfigurationData TABLE 45 GetConfigurationDataGetConfigurationData ( <requested_protocol_parameter> ) Purpose Servicefor the protocol engine to read configuration data Arguments identifieswhich protocol parameter's value shall be provided<requested_protocol_(—) [ pSyncSlot, ...] (This list is parameter>implementation specific) Return values value of the requested protocolparameter <protocol_parameter_(—) number (The format of the value>returned value is implementation specific)

[2218] Operation: Whenever the protocol engine requires a specificprotocol parameter it uses this interface to request the value. Theconfiguration data handling element may extract it directly from theconfiguration data or calculate the value from the configuration data.

[2219] Status Data Handling Interaction

[2220] The protocol engine must provide all indicators required for CHIwhich cannot be generated by one of the CHI elements.

[2221] Message Data Handling Interaction

[2222] Requirement 65: A mechanism shall be provided that ensures accessto consistent message data by the protocol engine. This means that whilethe protocol engine is accessing a message buffer's data it may not bechanged by other CHI elements

[2223] Controller Host Interface Services

[2224] Overview

[2225] The controller host interface services (CHI services) providedifferent services to the host processor. Conceptually the CHI servicescan be seen as an additional service layer that builds on the protocolservices provided by the protocol engine.

[2226] CHI services of higher complexity like the Message filteringservice fall apart in different CHI service features. Specific CHIservice features may require other CHI service features aspre-requisite.

[2227] Each CHI service is classified as either required or optional.All services, i.e. those classified as required as well as thoseclassified as optional, however, must adhere to the requirements definedin this chapter. In addition a CHI service may contain a set ofdifferent subservices.

[2228] Each CHI service feature in turn is also classified as eitherrequired or optional. A CHI service is required if it provides at leastone required CHI service feature.

[2229] A CHI service may also build on other CHI services. In this casea CHI service is required if it provides a dependency for at least oneother CHI service.

[2230] The CHI services interact with the host processor through thefour data handling units. This way the service status is indicated tothe host processor and the host processor can control and configure theservice. In addition a CHI service can act on message data provided byeither the host processor or the protocol engine to the message datahandling unit.

[2231] Currently eight CHI services are defined. Table 46 lists theeight CHI services along with any potential CHI service features and therespective classifications.

[2232] The protocol engine interface propagates all data provided by theprotocol engine via PutFrame, PutProtocolStatus, PutErrorStatusVector toall CHI services. Upon this data the CHI services perform all operationsand checks necessary to fulfill their functions. TABLE 46 Required andOptional CHI Services and Features Service name Service featureClassification Comment Message filtering Frame ID filtering Requiredservice Channel filtering Required Cycle counter Required filteringMessage ID filtering Optional Message FIFO Receive FIFO Optional serviceNetwork NM vector extraction Optional management NM function filteringOptional Requires NM vector extraction service (Currently not requirednor described) Timer service — Required Essential for time triggereddistributed applications Error signaling — Required service Symbolhandling Media access test Required Essential to perform the mediaservice symbol handling access test Status symbol Optional handling Hostinterrupt Timer interrupt Required Essential for accurate servicesynchronization of time triggered applications with the global timeError signaling Optional interrupt NM function interrupt OptionalRequires network management service Optical diagnosis — Optional service

[2233] Message Filtering Service

[2234] The message filtering service provides a means for retrievingmessage data from message buffers for transmission, respectively forstoring received message data to message buffers, depending on specificfilter conditions. In order to provide this service the protocol engineaccesses each message buffer via a message filter. Each message filtercan assess one or more filter conditions. The message filter checkswhether the message data meets the defined filter conditions or not.Message filters may be used with receive buffers as well as withtransmit buffers.

[2235] Currently filtering conditions are defined for the frame ID, thechannel ID, the cycle counter and the message ID.

[2236] The following transmit buffer related requirements must be metindependently from the filtering condition:

[2237] Requirement 66: In the case of a transmit buffer the buffercontents shall only be made available to the protocol engine fortransmission if the transmit buffer contains message data that meets allrespective filter conditions.

[2238] Requirement 67: If multiple filters match then a transmit buffershall be selected in a deterministic way.

[2239] The following receive buffer related requirements must be metindependently from the filtering condition:

[2240] Requirement 68: In the case of a receive buffer the message datacontained in a valid frame shall only be stored in the receive buffer ifthe message data contained in the frame meets all respective filterconditions.

[2241] Requirement 69: If multiple filters match then a receive buffershall be selected in a deterministic way independently of the protocolstate and message data.

[2242] Frame ID Filtering

[2243] Within Frame ID filtering the filter condition is applied to theframe ID. Frame ID filtering applies to transmit and receive buffers.

[2244] Requirement 70: For transmit buffers the filter shall considerthe respective slot counter for which data is requested by the protocolengine, for receive buffers the filter shall consider the frame IDcontained in the valid frame. The slot counter is always associated witha channel ID. A slot is assigned to the node for a specific channel ifboth the frame ID filter and the channel ID filter match for a buffer.

[2245] Requirement 71: Each filter shall be configured by means of aframe ID filter value and an optional frame ID filter mask.

[2246] Requirement 72: Each frame ID filter configuration shall bedetermined by static configuration data.

[2247] Requirement 73: The frame ID filter shall match if the consideredframe ID is equal to the frame ID filter value. If the filter holds aframe ID filter mask then the frame ID filter mask shall be applied tothe considered frame ID prior to the comparison with the frame ID filtervalue.

[2248] Channel Filtering

[2249] Within channel filtering the filter condition is applied to thechannel. Channel filtering applies to transmit and receive buffers.

[2250] Requirement 74: For transmit buffers the filter shall considerthe channel for which data is requested by the protocol engine, forreceive buffers the filter shall consider the channel on which the validframe was received. The channel ID is always associated with a slotcounter. A slot is assigned to the node for a specific channel if boththe frame ID filter and the channel ID filter match for a buffer.

[2251] Requirement 75: Each filter shall be configurable by means of achannel filter set that equals one of the following sets: {A}, {B},{A,B}, { }.

[2252] Requirement 76: Each channel filter configuration shall bedetermined by static or by variable configuration data.

[2253] Requirement 77: The channel filter shall match if the consideredchannel is contained in the channel filter set.

[2254] Message ID Filtering

[2255] Within message ID filtering the filter condition is applied tothe message ID. Message ID filtering applies only to receive buffers.

[2256] Requirement 78: The filter shall consider the message IDcontained in the valid frame only if the payload length of the framecontains at least one word. If the payload length contains 0 words thenthe filter shall not match.

[2257] Requirement 79: Each filter shall be configurable by means of amessage ID filter value and a message ID filter mask.

[2258] Requirement 80: The message ID filter shall match if the resultafter applying the considered message ID to the message ID filter maskis equal to the message ID filter value.

[2259] Requirement 81: The message ID filter configuration shall bedetermined by constant or by variable configuration data.

[2260] Cycle Counter Filtering

[2261] Within cycle count filtering the filter condition is applied tothe cycle count. Cycle count filtering applies to transmit and receivebuffers.

[2262] Requirement 82: For transmit buffers the filter shall considerthe cycle counter for which data is requested by the protocol engine,for receive buffers the filter shall consider the cycle count containedin the valid frame.

[2263] Requirement 83: Each filter shall be configurable by means of acycle set. A cycle set C_(b,c) contains all cycle numbers

C_(b,c)={x|x=(b+n*2^(c)) modulo (cCycleMax+1); n in N₀;0<=b<2^(c)<=cCycleMax+1}

[2264] with

[2265] b: Base cycle

[2266] c: Cycle repetition

[2267] b, c in N₀

[2268] Requirement 84: The cycle counter filter configuration shall bedetermined by constant or variable configuration data.

[2269] Requirement 85: A cycle counter filter shall match if theconsidered cycle count is contained in the cycle set C_(b,c).

[2270] Allowable Filtering Combinations

[2271] Requirement 86: Transmit buffers shall allow either a combinationof frame ID filtering and channel ID filtering or a combination of frameID filtering, channel ID filtering and cycle counter filtering.

[2272] Requirement 87: Receive buffers shall allow either a combinationof frame ID filtering and channel ID filtering, or a combination offrame ID filtering, channel ID filtering and cycle counter filtering, ora combination of message ID filtering and channel ID filtering, or acombination of message ID filtering, channel ID filtering, and cyclecounter filtering. Frame ID filtering and Message ID filtering aremutually exclusive for receive buffers, i.e. it is not possible toactivate frame ID filtering and message ID filtering at the same time.

[2273] Requirement 88: If the configuration of a filter is changedduring runtime while the protocol is in the NormalOperation state thenthe filter shall not match until the configuration is completed.

[2274] Message FIFO Service

[2275] Description

[2276] Message FIFO's are used to store and receive frame contentsaccording to the “first-in first-out” principle. Currently only receiveFIFO's are defined.

[2277] The receive FIFO stores the content from valid frames received bythe protocol engine. The host processor consumes the messages from theFIFO by reading from the FIFO.

[2278] Interaction with Protocol Engine Interface

[2279] Receive FIFO: Stores the provided message data upon a PutFramerequest if no dedicated message buffer can be found and the frame isaccepted by optional filters.

[2280] Interaction with Configuration Data Handling

[2281] Message filters may be configured in static or variableconfiguration data for select specific message for storage in receiveFIFOs. These message filters may accept or reject specific frame Ids ormessage Ids.

[2282] Interaction with Status Data Handling

[2283] Requirement 89: A Boolean free indicator shall be provided todetermine if there are messages stored in the FIFO.

[2284] Requirement 90: A Boolean locked indicator shall be provided todetermine if the FIFO has lost message data due to overflow.

[2285] Interaction with Message Data Handling

[2286] Message FIFOs are used to store/retrieve message data only whenno dedicated message buffer is configured for a specific message and theframe is accepted by optional filters.

[2287] Requirement 91: The sequence of messages from a specific channelstored in a receive FIFO shall be identical to the sequence of thesemessage on the FlexRay bus.

[2288] Note that if more than one channel is fed into one receive FIFO,then the message sequence in the FIFO will be consistent with themessage sequence for each channel individually, however no specificstorage sequence is defined between messages of different channels.

[2289] Network Management Service

[2290] Description

[2291] The Network management service provides means for the host tohandle the network management vector that can be transmitted in aFlexRay frame.

[2292] Constraints

[2293] The network management service is functional only duringNormalOperation.

[2294] Interaction with Protocol Engine Interface

[2295] This CHI service scans each frame provided by the protocol enginethrough PutFrame. If NMIndicationBit is set it becomes active.

[2296] Interaction with Configuration Data Handling

[2297] Requirement 92: The value of NMIndBit in frames to be transmittedshall be determined by static configuration data.

[2298] Interaction with Control Data Handling

[2299] Requirement 93: If a specific controller implementation supportsinterrupt triggering on specific NM events it shall be possible for thehost to disable these interrupts.

[2300] Interaction with Status Data Handling

[2301] Requirement 94: A network management (NM) vector vGloNMVec ofgNetworkManagementVectorLength bytes length shall be provided duringNormalOperation.

[2302] It is not required that vGloNMVecis valid in operation modesother than the NormalOperation.

[2303] It is up to the application to use only a subset of thegNetworkManagementVectorLength bytes for NM. In this case it is theresponsibility of the application to mask the unused bits.

[2304] Requirement 95: An updated vGloNMVecshall be provided at thebeginning of each communication cycle.

[2305] Requirement 96: The value of a vGloNMVec provided at thebeginning of a communication cycle shall be equal to a logical ORoperation of all fLocNMVec contained in correctly received frames withthe NM indication bit set during the previous communication cycle. Notethat the extraction of fLocNMVec depends on the use of messageidentifiers. This may be different for different frames. If message IDfiltering is disabled in the message buffer to store a received framethe fData[0 . . . 8] are used as fLocNMVec. If message ID filtering isenabled fData[2 . . . 10] are used as fLocNMVec. Note that the logicalOR combination applies also for different fLocNMVec values received onthe two channels in the same slot. At the beginning of the firstcommunication cycle in NormalOperation a NM vector initialized to 0shall be provided.

[2306] Requirement 97: A mechanism shall be provided that eitherprovides vGloNMVec in a consistent way, or indicates either explicitlyor implicitly if an inconsistent vGloNMVec was read by the host.

[2307] An implicit indication could be the cycle counter value of thecommunication cycle the NM vector was generated from. The host couldread and store this value, read the NM vector and verify if the cyclecounter value matches the stored value. If this check fails, the NMvector read is possibly not consistent. If the check succeeds the NMvector is consistent. This is only true if the host takes less than 64cycles to read the NM vector, because the cycle counter values repeatafter 63 cycles.

[2308] Requirement 98: If NMIndicationBit is set but the PayloadLengthof the frame is not large enough to hold the complete NM vector an errorshall be indicated and vGloNMVec shall not be changed.

[2309] Requirement 99: If NMIndicationBit is set and theNullframeIndicationBit is set an error shall be indicated and vGloNMVecshall not be changed

[2310] Interaction with Message Data Handling

[2311] Requirement 100: The message interface shall provide means forthe host processor to determine the values of the NM vector (fLocNMVec)in frames to be transmitted.

[2312] For all received frames provided to the host the messageinterface shall also provide the values of fNMIndBit and fLocNMVec.fNMIndBit and fLocNMVec represent the values for NM indication bit andNM vector contained in the (received) frame.

[2313] Timer Service

[2314] Description

[2315] This service allows the synchronization of the application withthe global time in the FlexRay cluster. Timers may be absolute (specificcycle and macrotick) or relative (to the time when they are started),and they may repetitive or single shot timers.

[2316] Interaction with Protocol Engine Interface

[2317] Timer events are triggered depending on the latest values ofvMacrotick and vCycle.

[2318] Interaction with Configuration Data Handling

[2319] Requirement 101: Timer events shall be contained in static orvariable configuration data.

[2320] Requirement 102: A timer event shall be defined unambiguously sothat the time (cycle number and macrotick) of activation can bedetermined.

[2321] Interaction with Control Data Handling

[2322] Timers as well as the timer interrupt can be enabled or disabledduring NormalOperation.

[2323] Interaction with Status Data Handling

[2324] Requirement 103: A dedicated interrupt shall be provided to thehost processor that is triggered when a timer has elapsed.

[2325] Error Signaling Service

[2326] Interaction with Control Data Handling

[2327] Requirement 104: Error signaling data shall be reset upon exit ofthe CC configuration state.

[2328] Interaction with Status Data Handling

[2329] Requirement 105: An locked status indicator shall be providedthat is set when vOffsetCorrection has reached the red region(vOffsetCorrection>gOffsetCorrectionOut).

[2330] Requirement 106: A locked status indicator shall be provided thatis set if vBgsmError is TRUE. This status indicator shall be reset whenvBgsmErrorAck is TRUE.

[2331] Requirement 107: A locked status indicator shall be provided thatis set when a media access test symbol (MTS) was received during thesymbol window

[2332] Symbol Handling Service

[2333] Description

[2334] This service allows to control which symbols are transmittedduring the symbol window. Moreover it provides information to the hostprocessor about the symbol received during the symbol window. Thisservice has the following features:

[2335] Media access test symbol handling—is a required feature toperform the media access test.

[2336] Status symbol handling—is an optional feature to handle statusnormal symbol and status alarm symbol.

[2337] Interaction with Protocol Engine Interface

[2338] The value of vTXSymbol shall provided on request through theGetConfigurationData interface if the argument is “vTXSymbol”.(TBD—formalize and standardize description)

[2339] Interaction with Configuration Data Handling

[2340] The length of the symbol window is a cluster constant andtherefore determined by static configuration.

[2341] Interaction with Control Data Handling

[2342] Requirement 108: Means shall be provided to control the value ofvTXSymbol.

[2343] Interaction with Status Data Handling

[2344] Requirement 109: The value of vRXSymbol shall be provided as freeindicator to the host processor interface.

[2345] Host Interrupt Service

[2346] Description

[2347] This service checks conditions to generate interrupt requests aswell as conditions to reset these requests.

[2348] Interaction with Protocol Engine Interface

[2349] Depending on the interrupts a FlexRay controller implementationsupports this CHI service may check conditions for interrupt generationor reset upon data provide through PutFrame, upon the protocol stateprovided through PutProtocolState and on the error status vectorprovided by PutErrorStatusVector.

[2350] Interaction with Configuration Data Handling

[2351] None required.

[2352] Interaction with Control Data Handling

[2353] Requirement 110: Means shall be provided to control data handlingto selectively enable and disable every interrupt generated by thisservice.

[2354] Interaction with Status Data Handling

[2355] Requirement 111: This CHI service generates a timer interruptrequest upon request of the Timer service.

[2356] Depending on the additional interrupts a FlexRay controllerimplementation supports further interrupt requests are generated.

[2357] Interaction with Message Data Handling

[2358] Depending on the additional interrupts a FlexRay controllerimplementation supports upon reception or transmission of specificframes.

[2359] Optical Diagnosis Service

[2360] Description

[2361] This service provides information provided by the opticaltransceiver indicating if the optical power is below a given threshold.

[2362] Interaction with Protocol Engine Interface

[2363] Requirement 112: An interface function PutOpticalDiagnosisFlagsshall be provided. TABLE 47 PutOpticalDiagnosisFlagsPutOpticalDiagnosisFlags ( <flag_A>, <flag_B> ) Purpose Indicate thattoo low of an optical power is received by the optical transceiversArguments values of the optical diagnosis flags; TRUE if the opticalpower is sufficient <flag_A>  [TRUE, FALSE] <flag_B>  [TRUE, FALSE]Return values None

[2364] Interaction with Status Data Handling

[2365] Requirement 113: One optical diagnosis indicator is provided foreach channel.

[2366] Interaction with Message Data Handling

[2367] Depending on the additional interrupts a FlexRay controllerimplementation supports upon reception or transmission of specificframes.

[2368] Bus Driver Interface

[2369] Introduction

[2370] This chapter describes the interface to the electrical FlexRayBus Driver (BDe). This interface comprises three components, theinterface to the FlexRay Communication Controller (CC), the interface tothe FlexRay Bus Guardian (BG) and the interface to the host. Adescription of the BDe operation can be found in FlexRay ElectricalPhysical Layer Preliminary Functional Specification, v1.0, PhilipsCorporation, 2002 and in Chapter ‘Requirements for Hardware States’.

[2371] Bus Driver—Communication Controller Interface

[2372] Overview

[2373] The Bus Driver—Communication Controller Interface is shown inFIG. 77. The interface between the BDe and the CC comprises threedigital electrical signals, two that are inputs to the BDe from the CC(named TxD and TxEN), and one that is an output from the BDe to the CC(named RxD).

[2374] The following description is valid, when the BDe is in BDe_Normalmode.

[2375] TxEN is an input to the BDe from the CC. It is used by the CC toenable the BDe to drive the Data_(—)0 or Data_(—)1 state onto thechannel.

[2376] While the CC maintains a logical HIGH state on TxEN, the BDesignals Idle onto the channel.

[2377] While the CC maintains a logical LOW state on TxEN, the BDedrives Data_(—)0 or Data_(—)1 onto the channel (depending on TxD input,see below), but only if the BG concurrently permits the BDe to do so(see below). If the BG does not permit this, the BDe continues to signalIdle onto the channel.

[2378] TxD is an input to the BDe from the CC used by the CC to transferthe actual signal sequence to the BDe for transmission onto the channel.This signal sequence is the signal stream to be transmitted. With alogical LOW state on TxD the BDe drives Data_(—)0 and with a logicalHIGH state on TxD the BDe drives Data_(—)1 onto the channel, when theBDe has the permission from the BG and is enabled by the CC via TxEN.

[2379] RxD is an output from the BDe to the CC used by the BDe totransfer the actual received signal sequence to the CC. It is thereceived data stream. RxD is driven to a logical LOW state when thechannel signals Data_(—)0. When the channel signals Idle or Data_(—)1,RxD is driven to a logical HIGH state.

[2380] When the BDe is not in BDe_Normal mode, it signals Idle onto thechannel.

[2381] Bus Driver—Bus Guardian Interface

[2382] Overview

[2383] The Bus Driver—Bus Guardian Interface is shown in FIG. 78. Theinterface between the BDe and the BG comprises two digital electricalsignals, one input to the BDe (named BGE) and one output from the BDe(named RxEN).

[2384] BGE is an input to the BDe from the BG. It is used by the BG topermit the BDe to drive the states Data_(—)0 and Data_(—)1 onto thechannel.

[2385] While the BG maintains a logical LOW state on BGE, the BDesignals Idle onto the channel.

[2386] While the BG maintains a logical HIGH state on BGE, the BDe ispermitted to drive Data_(—)0 or Data_(—)1 onto the channel depending onTxD and TxEN input (see above).

[2387] The following description is valid, when the BDe is in BDe_Normalmode.

[2388] RxEN is an output from the BDe to the BG used by the BDe toindicate whether the channel is in the Idle state or not.

[2389] While the channel is in the Idle state RxEN is driven to alogical HIGH state.

[2390] While the channel signals Data_(—)0 or Data_(—)1 RxEN is drivento a logical LOW state.

[2391] When the BDe is not in BDe_Normal mode, then RxD and RxEN shallbe in a logical HIGH state.

[2392] Bus Driver—Host Interface

[2393] The bus driver host interface is a product specific interface. Itenables the host to control the operating modes of the BDe and to readerror conditions from the BDe. This interface also has to signal thewaking source (local wake-up event or remote wake-up via wake-up symbolon the bus).

[2394] The interface may be realized with a serial communicationinterface (e.g. “SPI”) or using hard wired signals (e.g. dedicated pinsfor operating mode control and error signaling).

[2395] A description of the BDe operating modes is provided in Chapter‘Requirements for Hardware States’.

[2396] Interface Signal Timing

[2397] BDe Output Signals: RxD and RxEN

[2398] The expected timing of RxD and RxEN is depicted in FIG. 79 (frametransmitted in the static part of the communication cycle). TheTransmission Start Sequence (TSS) that a node receives may be shorterthan the TSS that was originally sent. The reason for this is thatactive stars may truncate a portion of the TSS. RxEN will stay onlogical LOW state after the last transmitted bit for the duration of theMediaIdleDetectionTime. (See Chapter ‘Coding and Decoding’ for moreinformation about the TSS and the document FlexRay Electrical PhysicalLayer Preliminary Functional Specification, v1.0, Philips Corporation,2002 for the effect of truncation)

[2399] A node that transmits a frame can read back its own transmissionon RxD if loop back is provided by the BDe. In case that the last bitwas transmitted as Data_(—)1 (frames in static and dynamic part,symbols: EIS, SNS, or SAS), only the transmitting node may see adifferent behavior (depicted in red) of RxD after the end of its ownframe or symbol than all other receivers in the network. This happenswhen common mode chokes are used with a significant stray inductance.

[2400] Since the symbols WU, CAS, MTS end on Data_(—)0 the situation isslightly different in these cases. The RxD and RxEN behavior is shown inFIG. 80.

[2401] The Transmission Start Sequence (TSS) that a node receives may beshorter than the TSS that was originally sent (see above). This effectmight not be compensated by the effect of enlarging the symbol by theMediaIdleDetectionTime. The transmitting node may see, when reading backits own transmission, the behavior that is depicted by the dotted redline, when common mode chokes with a significant stray inductance areused.

[2402] BDe Input Signals: TxD and TxEN

[2403] The required timing of TxD and TxEN is depicted in FIG. 81.

[2404] With the start of the first bit to be transmitted the TxEN isswitched to logical LOW state and returned to logical HIGH state at theend of the last bit that was to be transmitted. Edges in TxEN areexpected to be synchronous with the first and last edge within the TxDsignal.

[2405] Bus Guardian Interface

[2406] Introduction

[2407] This chapter covers conformance requirements that apply to theinterface between the communication controller (CC) and de-centralizedbus guardian (BG) functional blocks. The decentralized bus guardianprotects the communication channel(s) from improper transmissions by afaulty or misconfigured communication controller that attempts totransmit outside of its pre-configured schedule. The bus guardian hasindependent knowledge of the node's communication schedule and restrictstransmission to only those times allowed by the schedule. This chapterspecifies the interface between the bus guardian and the communicationcontroller and gives an overview of the bus guardian scheduling scheme.It also establishes the requirements on the BG and CC behavior withrespect to the interface signals between the BG and CC. For a detailedfunctional specification of the bus guardian please refer to FlexRay BusGuardian Preliminary Functional Specification, v1.2, PhilipsCorporation, 2002.

[2408] The second part of this chapter contains a specification of theBG schedule monitoring service provided by the communication controller.The purpose of this service is to supervise the bus guardian scheduleand inform the host when a mismatch is detected between thecommunication schedule of the BG and CC.

[2409] BG—CC Interface Signals

[2410] Table 48 shows a list of bus guardian inputs and outputs at theinterface between the bus guardian and the communication controller. Theblock diagram shown in FIG. 82 describes how bus guardians are connectedto a communication controller in a dual-channel FlexRay node. Note thatthe signals TxEN and BGE are associated with the particular channel.There must be dedicated TxEN and BGE signals for each channel (Refer toFlexRay Requirements Specification, Req. 219 G: The bus guardian mustnot disable access to more than one channel, i.e., one bus guardian perchannel is required.). In addition to the BG-CC interface signals theblock diagram also shows the RxEN signal from the bus driver, which isrequired for local evaluation of the media access test.

[2411] BG-CC Interface Signals Overview TABLE 48 BG - CC InterfaceSignals (Data direction DIR relative to the bus guardian. ‘I’ representsan input to the BG, ‘O’ represents an output from the BG.) Symbol DIRACTIVE Description MT I rising edge Macrotick - clock signal from CC BGTI rising edge Bus guardian tick - clock signal from CC ARM I fallingedge ARM trigger signal from CC TxEN I LOW Transmit enable signal fromCC TxEN = HIGH: transmission inactive TxEN = LOW: transmission activeBGE O HIGH Transmission enable signal for Bus Driver BGE = HIGH:transmission enabled BGE = LOW: transmission disabled

[2412] BG-CC Interface Signals Description

[2413] MT

[2414] The MT signal, generated by the CC, is used as a clock signal forthe BG scheduler. The rising edge of the MT signal must be aligned tothe start of the CC's internal locally corrected macrotick. The CC shallensure that any internal macrotick corrections are reflected in the MTsignal during the same macrotick (i.e., the MT signal is an accuraterepresentation of the CC's internal locally corrected macrotick clock).

[2415] BGT

[2416] The BGT signal, generated by the CC, is used for supervision ofthe MT period. The BGT period is not affected by clock corrections anddepends only on the frequency of the CC's crystal oscillator and afrequency divider at the CC.

[2417] ARM

[2418] The ARM signal is generated by the CC and indicates the start ofthe communication cycle to the BG. The ARM signal from the CC isgenerated such that it is synchronous to the MT signal (ARM edgesaligned to rising edge of the MT signal). The falling edge of the ARMsignal defines the ARM trigger event for BG cycle synchronization. Afternode startup the BG schedule needs to be synchronized to the CCschedule. This is achieved by means of the first ARM trigger event thatis detected by the BG after node startup. Subsequent ARM trigger eventsare not required for cycle synchronization, but for supervision of theconfigured cycle length. The BG checks for the regular occurrence of ARMtrigger events at the start of each cycle by counting the number of MTperiods between ARM trigger events and comparing the result to theexpected BG cycle time as calculated below.

[2419] BGE

[2420] The BGE signal is generated by the bus guardian and controlstransmit access to the communication medium. Any transmit access to themedium shall be disabled as long as the BGE signal is in an inactivecondition (BGE=LOW). The BGE signal is also provided to the CC as aninput signal that is used for supervision of the BG schedule. Pleaserefer to the BG schedule monitoring service described below.

[2421] TxEN

[2422] The TxEN signal is generated by the CC and indicates that the CCis currently attempting to transmit on the particular channel. Thissignal shall be evaluated by the BG for supervision of the CC schedule.The BG shall detect a schedule mismatch if the TxEN signal is activewhile the BGE signal is inactive (Refer to the BG FunctionalSpecification for details of the schedule monitoring features providedby the BG.).

[2423] Bus Guardian Scheduling Scheme

[2424]FIG. 83 shows an overview of the relation between CC schedule andBG schedule at the communication segment level. For each segment of theCC schedule a corresponding segment of the BG schedule shall beconfigured. The BG static segment and the BG watchdog disable time aremandatory parts of the BG schedule. The BG static segment must containat least one static slot. The minimum length of the BG watchdog disabletime is 1 MT period.

[2425] Parts of the BG schedule that may be used for transmission areseparated by inter-slot gaps (ISG). This applies to static slots, the BGdynamic segment, and the BG symbol window. The BG shall enabletransmission one macrotick prior to the expected beginning of atransmission and disable it one macrotick after the expected end. Notethat a minimum ISG length of 2 macroticks is required in order tofulfill this requirement.

[2426] The ISG contains two optional elements gdBGpreEnablePart andgdBGpostEnablePart. Alignment of the BG schedule to the CC action pointsis achieved by configuration of gdBGpreEnablePart. while configurationof gdBGpostEnablePart allows to increase the safety margin betweentransmissions.

[2427]FIG. 84 illustrates the BG-CC timing during the static segment.Transmit access is enabled gdBGpreEnablePart macroticks after thebeginning of a static slot and stays enabled for gdBGStaticSlot+2macroticks. The static slot is completed by a period ofgdBGpostEnablePart macroticks, during which transmission is disabled bythe BG.

[2428] The BG communication cycle start is defined to be at thebeginning of static slot 1. The BG shall assume the ARM trigger eventshappen at the BG cycle start.

[2429] At the beginning of the dynamic segment two possible cases mustbe distinguished (Refer to section ‘Dynamic Segment’). FIG. 85 shows theBG-CC timing of a configuration withgdActionPointOffset>gdMSActionPointOffset. In this case transmit accessis enabled one macrotick prior to the action point at the CC. FIG. 86shows the BG-CC timing of a configuration withgdActionPointOffset≦gdMSActionPointOffset. In this case transmit accessis enabled gdMSActionPointOffset−gdActionPointOffset+1 macroticks priorto the action point at the CC.

[2430] In general, transmit access is enabled gdBGpreEnablePartmacroticks after the beginning of the dynamic segment, independent fromthe configuration of gdMSActionPointOffset and stays enabled forgdBGDynSegment+2 macroticks.

[2431]FIG. 87 shows the BG-CC timing at the end of the dynamic segmentas well as during the BG symbol window and the BG watchdog disable time(WDT). During the BG watchdog disable time supervision of the MT periodis disabled. This allows clock offset correction to shorten or lengthenmacroticks by an amount that would exceed the configured limits of themacrotick supervision. The BG may be configured to enable or disabletransmission during the BG dynamic segment and the BG symbol window,respectively. Transmit access is enabled gdBGpreEnablePart macroticksafter the beginning of the symbol window and stays enabled forgdBGSymbolWindow+2 macroticks. The BG disables transmission during theBG watchdog disable time gdBGWatchdogDisable.

[2432] The BG shall support the application of the media access testduring the symbol window, i.e. in addition to disabling transmit accessa transmit attempt by the CC shall not be detected as schedule violationerror. The purpose of the media access test is to check whether the BGsuccessfully disables transmission. The BG supports application of themedia access test if transmission during the symbol window is disabled(pBGSymWinEnable=0) and media access test is enabled (pBGMatEnable=1).Table 49 describes the configurable behavior of the BG during the BGsymbol window. TABLE 49 BG Behavior During the BG Symbol Window Mediaaccess test BG behavior during BG symbol window enabled If TxEN isactive during the BG symbol window (pBGMatEnable = 1) the BG does notenter BG_FailSilent mode and does not report a schedule violation errorto the host controller. Local evaluation of the media access test isperformed. The BG reports a local media access test error to the hostcontroller if TXEN and RXEN signals are simultaneously active during theBG watchdog disable time. disabled If TxEN is active during the BGsymbol (pBGMatEnable = 0) window the BG enters BG_FailSilent mode andreports a schedule violation error to the host controller.

[2433] The relation between BG configuration parameters and globalprotocol parameters is defined by:

[2434] gdBGStaticSlot+ISG=gdStaticSlot

[2435]gdBGDynSegment+ISG=gNumberOfMinislots*gdMinislot+(gdActionPointOffset−gdMSActionPointOffset)The above equation only holds when gNumberOfMinislots!=0; The term(gdActionPointOffset−gdMSActionPointOffset) only applies ifgdActionPointOffset>gdMSActionPointOffset.

[2436] gdBGSymbolWindow+ISG=gdSymbolWindow

[2437] The above equation only holds when gdSymbolWindow!=0.

[2438] gdBGWatchdogDisable=gdNIT

[2439] gdBGpreEnablePart+1=gdActionPointOffset

[2440] The inter-slot gap (ISG) is defined by:

[2441] ISG=gdBGpreEnablePart+gdBGpostEnablePart+2

[2442] Using BG configuration parameters the cycle time is calculatedby:

[2443] BG cycle time(MT)=gNumberOfStaticSlots*(gdBGStaticSlot+ISG)+gdBGDynSegment+ISG+gdBGSymbolWindow+ISG+gdBGWatchdogDisable

[2444] gdBGDynSegment is an optional dynamic segment. (The BG dynamicsegment and the corresponding ISG are not part of the BG schedule ifgdBGDynSegment=0 is configured.) gdBGSymbolWindow is an optional symbolwindow. (The BG symbol window and the corresponding ISG are not part ofthe BG schedule if gdSymbolWindow=0 is configured.)

[2445] A summary of configuration parameters related to the bus guardianschedule is shown in Table 50. TABLE 50 Bus Guardian ScheduleConfiguration Parameters Name Range Unit Remarks gdBGStaticSlot 0 to4095 MT Static slot length (This does not include the inter-slot gap.)gdBGDynSegment 0 to 65534 MT BG dynamic segment length (The BG supportsstatic mode operation if gdBGDynSegment = 0 is configured.)gdBGSymbolWindow 0 to 255 MT BG symbol window length (Configurationswithout symbol window are supported if gdBGSymbolWindow = 0 isconfigured.) gdBGpreEnablePart 0 to TBD MT ISG part that precedes aguarded schedule element gdBGpostEnablePart 0 to TBD MT ISG part thatfollows a guarded schedule element gdBGWatchdogDisable 1 to 255 MT BGwatchdog disable time (Part of the BG schedule reserved for theapplication of clock offset correction.) gdBGArmActive 1 MT Duration ofthe ARM signal low condition

[2446] BG—CC Synchronization

[2447] The FlexRay bus guardian approach maintains synchronization ofthe local BG schedule to the global time by basing all BG schedulingoperations on a corrected macrotick signal (MT) being provided by theCC. This allows the BG to perform its media access protection function(i.e. restricting transmit access to the configured schedule) whilebeing continuously synchronized to the global clock using the clocksynchronization algorithm of the CC.

[2448] A second clock signal, bus guardian tick (BGT), used forsupervising the period of the MT signal, is provided by the CC. Thecommunication controller shall generate the BGT signal such that itsperiod is independent from the clock correction performed by the CC (Forexample, the BGT signal could be derived from the application of aprogrammable prescaler to the oscillator input of the CommunicationController.). The bus guardian shall use the BGT signal to perform asupervision of the duration of the corrected macrotick by checking ifthe MT/BGT ratio deviates from the nominal ratio by more than apre-defined configurable limit. Acceptable deviations from the nominallimit may be caused by the clock rate correction algorithm as itincreases or decreases the length of certain macroticks to maintain theoverall clock rate.

[2449] BG—CC Interface Requirements

[2450] Table 51 shows the BG-CC interface timing requirements. Note thespecified restrictions have been introduced as a result of certainsemiconductor technology limitations. TABLE 51 BG-CC Interface TimingRequirements (These timing requirements are implementation-specific.)Name Description Range/Value Units gdBGMinMTNom Minimum nominal MTperiod 1.0 μs gdBGMinMTCorr Minimum corrected MT period 0.5 μspdBGMTPeriod Configured nominal MT period TBD μs gdBGMinPwMT Minimum MTpulse width (low or high) 0.4 * pdMTPeriod — gdBGMinBGTPeriod MinimumBGT period 0.25 μs pdBGTPeriod Configured BGT period TBD μs gdMinPwBGTMinimum BGT pulse width (low or high) 0.4 * — pdBGTPeriod

[2451] BG Schedule Monitoring Service

[2452] Background

[2453] The BG schedule monitoring (BGSM) service is a service that isprovided by the FlexRay communication controller. The purpose of thisservice is to assess that the execution of the bus guardian schedulematches the execution of the respective schedule of the CC.

[2454] Proposed Functional Specification

[2455] Structure

[2456] The bus guardian schedule monitor uses the following inputsignals to perform its function (see FIG. 88): The BGE signal, the ruleto be monitored iBgsmRule and the acknowledgement signal vBgsmErrorAckas inputs. The BGSM function produces the output signal vBgsmError. TheCC protocol state machine reads the parameters pdBgeStaticDuration,pdBgeDynamicDuration, pdBgeSymbolDuration, pBgsmDynSegDisabled, andpBgsmSymWinDisabled The following constraints apply to these parameters:

[2457] BGEε{0, 1},

[2458] iBgsmRuleε{BGE_X, BGE_ENABLED, BGE_DISABLED},

[2459] vBgsmErrorAckε{FALSE, TRUE},

[2460] vBgsmErrorε{FALSE, TRUE},

[2461] pdBgeStaticDuration[MT]ε{1 . . . TBD},

[2462] pdBgeDynamicDuration[MT]ε{1 . . . TBD},

[2463] pdBgeSymbolDuration[MT]ε{1 . . . TBD},

[2464] pBgsmDynSegDisabledε{FALSE, TRUE},

[2465] pBgsmSymWinDisabledε{FALSE, TRUE}.

[2466]FIG. 89 depicts a state machine that describes the operation ofthe BGSM service.

[2467] Interaction of the BG Schedule Monitor with the ProtocolOperation

[2468] Background

[2469] Protocol operation can be separated in two distinct phases: theinitial unsynchronized startup phase and the subsequent synchronizedoperation phase. The two phases differ as follows:

[2470] during the initial unsynchronized startup phase the communicationcontroller has no knowledge of the system wide synchronized time, i.e.the slot counter and the cycle counter are not synchronized.

[2471] during the synchronized operation phase the communicationcontroller has knowledge of the system wide synchronized time, i.e. theslot counter and the cycle counter are synchronized.

[2472] Unsynchronized Startup Phase

[2473] Within the unsynchronized startup phase the BGSM shall executethe accept all rule, i.e. iBgsmRule is set to BGE_X.

[2474] Synchronized Operation Phase

[2475] Within the synchronized operation phase the communicationschedule is used to access the communication media. A communicationschedule consists of the following constituents: the static segment, thedynamic segment, the symbol window and the network idle time (NIT).

[2476] Static Segment

[2477] The configuration parameter pdBgeStaticDuration defines theduration of the BGE active phase during transmission slots in the staticsegment. The relationship between pdBgeStaticDuration and otherconfiguration parameters related to the static segment is given by:

[2478]pdBgeStaticDuration=gdBGStaticSlot+2=gdStaticSlot−gdBGpreEnablePartgdBGpostEnablePart

[2479] with:

[2480] gdBGpreEnablePart=gdActionPointOffset−1

[2481]gdBGpostEnablePart=gdStaticSlot−pdBgeStaticDuration−gdActionPointOffset+1

[2482] Transmission Slot

[2483] Starting with the first macrotick of the transmission slot thefollowing rule shall be applied: if (gdBGpreEnablePart == 0) OR(gdBGpostEnablePart == 0 AND previous static slot == enabled) iBgsmRuleshall be set to BGE_X; else iBgsmRule shall be set to BGE_DISABLED; end;

[2484] Starting with the second macrotick of the transmission slot thefollowing rule shall be applied: if (gdBGpreEnablePart > 1) iBgsmRuleshall be set to BGE_DISABLED; end;  Starting with macrotickgdActionPointOffset of the   transmission slot the following rule shallbe applied: if (gdBGpreEnablePart > 0) iBgsmRule shall be set to BGE_Xend;  Starting with macrotick gdActionPointOffset + 1 of the  transmission slot iBgsmRule shall be set to   BGE_ENABLED.  Startingwith macrotick pdBgeStaticDuration +   gdActionPointOffset the followingrule shall be applied: if (gdBGpostEnablePart > 0) iBgsmRule shall beset to BGE_X end;

[2485] Starting with macrotick pdBgeStaticDuration+gdActionPointOffset+1the following rule shall be applied: if (gdBGpostEnablePart > 1)iBgsmRule shall be set to BGE_DISABLED; end;

[2486] Reception slot

[2487] Starting with the first macrotick of the reception slot thefollowing rule shall be applied: if (previous static slot == enabled)AND (gdBGpostEnablePart == 0) iBgsmRule shall be set to BGE_X; elseiBgsmRule shall be set to BGE_DISABLED; end;

[2488] Starting with the second macrotick of the reception slotiBgsmRule shall be set to BGE_DISABLED.

[2489]FIG. 90 shows the interaction in the static segment. FIG. 91 showsthe interaction in the static segment for a minimum ISG length.

[2490] Dynamic Segment

[2491] The configuration parameter pdBgeDynamicDuration defines theduration of the BGE active phase during the dynamic segment. Therelationship between pdBgeDynamicDuration and other configurationparameters related to the dynamic segment is given by:

[2492]pdBgeDynamicDuration=gdBGDynSegment+2=gNumberOfMinislots*gdMinislot−gdBGpreEnablePart−gdBGpostEnablePart

[2493] (Note: The equation gNumberOfMinislots only holds whengNumberOfMinislots!=0.) with:

[2494] gdBGpreEnablePart=gdActionPointOffset−1

[2495]gdBGpostEnablePart=gdStaticSlot−pdBgeStaticDuration−gdActionPointOffset+1

[2496] The following rules apply only to configurations, that contain adynamic segment (gdNumberOfMinislots!=0). The configuration parameterpBgsmDynSegDisabled indicates if transmission during the dynamic segmentshall be enabled or disabled by the BG and controls which set of ruleshas to be applied.

[2497] pBgsmDynSegDisabled=TRUE

[2498] Starting with the first macrotick of the dynamic segment thefollowing rule shall be applied: if (last static slot == enabled) AND(gdBGpostEnablePart == 0) iBgsmRule shall be set to BGE_X; elseiBgsmRule shall be set to BGE_DISABLED; end;

[2499] Starting with the second macrotick of the dynamic segmentiBgsmRule shall be set to BGE_DISABLED.

[2500] pBgsmDynSegDisabled=FALSE

[2501] Starting with the first macrotick of the dynamic segment thefollowing rule shall be applied: if (gdBGpreEnablePart == 0) OR (laststatic slot == enabled) AND (gdBGpostEnablePart == 0) iBgsmRule shall beset to BGE_X; else iBgsmRule shall be set to BGE_DISABLED; end;

[2502] Starting with the second macrotick of the dynamic segment thefollowing rule shall be applied: if (gdBGpreEnablePart > 1) iBgsmRuleshall be set to BGE_DISABLED; end;

[2503] Starting macrotick gdActionPointOffset of the dynamic segmentiBgsmRule shall be set to BGE_X.

[2504] Starting with macrotick gdActionPointOffset+1 iBgsmRule shall beset to BGE_ENABLED.

[2505] Starting with macrotick pdBgeDynamicDuration+gdActionPointOffsetthe following rule shall be applied: if (gdBGpostEnablePart > 0)iBgsmRule shall be set to BGE_X; end;

[2506] Starting with macrotickpdBgeDynamicDuration+gdActionPointOffset+1 the following rule shall beapplied: if (gdBGpostEnablePart > 1) iBgsmRule shall be set toBGE_DISABLED; end;

[2507]FIG. 92 shows the interaction in the dynamic segment with thesymbol window disabled.

[2508] Symbol Window

[2509] The configuration parameter pdBgeSymbolDuration defines theduration of the BGE active phase during the symbol window. Therelationship between pdBgeSymbolDuration and other configurationparameters related to the symbol window is given by:

[2510]pdBgeSymbolDuration=gdBGSymbolWindow+2=gdSymbolWindow−gdBGpreEnablePart−gdBGpostEnablePart

[2511] The following rules apply only to configurations, that contain asymbol window (gdSymbolWindow !=0). The configuration parameterpBgsmSymWinDisabled indicates if transmission during the symbol windowshall be enabled or disabled by the BG and controls which set of ruleshas to be applied.

[2512] pBgsmSymWinDisabled=TRUE

[2513] Starting with the first macrotick of the symbol window thefollowing rule shall be applied: if (gdBGpostEnablePart == 0) AND(pBgsmDynSegDisabled == FALSE) iBgsmRule shall be set to BGE_X; elseiBgsmRule shall be set to BGE_DISABLED; end;

[2514] Starting with the second macrotick of the symbol window iBgsmRuleshall be set to BGE_DISABLED.

[2515] pBgsmSymWinDisabled=FALSE

[2516] Starting with the first macrotick of the symbol window thefollowing rule shall be applied: if (gdBGpreEnable Part == 0) OR(gdBGpostEnable Part == 0 AND pBgsmDynSegDisabled == FALSE) iBgsmRuleshall be set to BGE_X; else iBgsmRule shall be set to BGE_DISABLED; end;

[2517] Starting with the second macrotick of the symbol window thefollowing rule shall be applied: if (gdBGpreEnablePart > 1) iBgsmRuleshall be set to BGE_DISABLED; end;

[2518] Starting with macrotick gdActionPointOffset of the symbol windowthe following rule shall be applied: if (gdBGpreEnablePart > 0)iBgsmRule shall be set to BGE_X; end;

[2519] Starting with macrotick gdActionPointOffset+1 iBgsmRule shall beset to BGE_ENABLED.

[2520] Starting with macrotick pdBgeSymbolDuration+gdActionPointOffsetthe following rule shall be applied: if (gdBGpostEnablePart > 0)iBgsmRule shall be set to BGE_X; end;

[2521] Starting with macrotick pdBgeSymbolDuration+gdActionPointOffset+1the following rule shall be applied: if (gdBGpostEnablePart > 1)iBgsmRule shall be set to BGE_DISABLED; end;

[2522]FIG. 93 shows the interaction in the symbol window and the networkidle time.

[2523] Network Idle Time

[2524] Starting with the first macrotick of the network idle time thefollowing rule shall be applied: if (gdBGpostEnablePart == 0) AND (pBgsmSymWinDisabled == FALSE) iBgsmRule shall be set to BGE_X; elseiBgsmRule shall be set to BGE_DISABLED; end;

[2525] Starting with the second macrotick of the network idle timeiBgsmRule shall be set to BGE_DISABLED.

[2526] Host Interaction

[2527] Upon detection of a rule violation the communication controllershall signal this violation to the host computer by means of the flagvBgsmError in the host interface.

[2528] The flag shall remain set until it is cleared by the hostcontroller.

[2529] Comments

[2530] Currently it is not foreseen to have the option to deactivate theschedule monitor. Note with systems operating without a BG this impliesthe vBgsmError will indicate a permanent BG error as soon as the(expected) first mismatch between the configured rule and the BGE signaloccurs.

[2531] Event Triggered Mode

[2532] Introduction

[2533] This chapter describes the event triggered communication mode ofthe FlexRay communication protocol. In contrast to the time triggeredcommunication mode, the repetition interval of the communication cyclemay vary in the event triggered communication mode.

[2534] Operating Modes

[2535] FlexRay supports two operating modes for communication cycleexecution (see FIG. 94, in which the FlexRay communication operationmodes are shown):

[2536] A time triggered communication mode, where the timebase isgenerated either by a distributed clock algorithm or under control of acommunication master

[2537] An event triggered communication mode

[2538] The different operating modes are described below.

[2539] Time Triggered Communication Cycles

[2540] This mode is described in detail in the media access chapter (seeChapter ‘Media Access Scheme’).

[2541] Event Triggered Communication Cycles

[2542] In the event triggered communication mode the communication cycleis always initiated by a master node. The master node may initiate thecommunication cycle based on the input of a number of sources. Themanagement of these sources is under host control via the CHI. Thefollowing functionality is the minimum required (see FIG. 95, in whichthe event triggered communication handling in the host, the CHI and theCC is shown).

[2543] A mechanism that allows the host to initiate a communicationcycle via the CHI. There are many means by which this could beaccomplished. An example is a CHI element that, when written by thehost, would cause the initiation of a communication cycle. If the hostinitiates a new trigger during a communication cycle, a newcommunication cycle shall be triggered immediately after the end of thecurrent communication cycle.

[2544] A configurable timer to initiate periodic communication cycles.The CHI provides a function to start/stop the timer. If the timer isenabled a communication cycle is started when the timer expires.

[2545] A direct hardware input to the Communication Controller totrigger the communication cycle by an external hardware pin. The CHIgives the host the opportunity to configure the direct hardware input(enable/disable, edge sensitivity, etc.).

[2546] All CHI sources can raise the CC Trigger signal (OR function).The protocol engine interface that is required is the CC Trigger Input.

[2547] If the CC trigger signal at a dedicated master occurs thecommunication cycle is initiated by sending an event indication symbol(EIS) within the trigger window. The new cycle is then started after theNIT with frame ID 1 is sent by the master.

[2548] In the event triggered communication mode bus guardian protectionis not required.

[2549] The clocks on the master and slave nodes are synchronized bysending and receiving the EIS symbol. The FlexRay protocol does notspecifically handle a fault that prevents the communication master fromsending the EIS or frame ID 1. There are possible recovery strategies(reconfiguration of the system to use a new master, for example), butthese must be implemented at the application level and are not part ofthe protocol.

[2550] The event triggered mode supports two channels. The mastercontrols both channels in a two-channel system. The master sends the EISand frame ID 1 at the same time on all configured channels. The slavenodes need not be connected to both channels. If a slave is connected toboth channels, the channel with a correct EIS symbol in combination withthe frame ID 1 wins the arbitration and determines the cycle start onthe slave.

[2551] The use of an EIS symbol in combination with the frame with ID 1provides the following advantages:

[2552] Slave nodes can react on a trigger event on the master node withminimal time delay on the assumption of the FlexRay media access scheme.Therefore the re-use of the FlexRay media access scheme is possible.

[2553] Cycle counter will be incremented in the master and the slave atthe (cycle start). Therefore nearly the same frame acceptance method canbe applied

[2554] Re-ordering of the messages in the dynamic part can be donewithin the NIT

[2555] Media Access—Event Triggered Mode

[2556] The communication cycle is the fundamental element of the mediaaccess scheme within FlexRay. It is defined by means of a timinghierarchy.

[2557] Timing Hierarchy

[2558] The timing hierarchy consists of four timing hierarchy levels asshown in FIG. 96.

[2559] The highest level, the communication cycle level, defines thecommunication cycle. It contains the static segment, the dynamicsegment, the symbol window and the network idle time (NIT). Within thestatic segment a static time division multiple access scheme is used toarbitrate transmissions as specified in Section ‘Static Segment’. Withinthe dynamic segment a dynamic mini-slotting based scheme is used toarbitrate transmissions as specified in Section ‘Dynamic Segment’. Thesymbol window is a communication period in which one symbol out of adefined set of symbols can be transmitted on the network as specified inSection ‘Symbol Window’. The static segment, the dynamic segment and thesymbol window form the network communication time (NCT), a period duringwhich network wide communication takes place. The network idle timedefines a communication-free period that concludes each communicationcycle.

[2560] The next lower level, the arbitration grid level, contains thearbitration grid that forms the backbone of FlexRay media arbitration.In the static segment the arbitration grid consists of consecutive timeintervals, called static slots, in the dynamic segment the arbitrationgrid consists of consecutive time intervals, called minislots.

[2561] The arbitration grid level builds on the macrotick level that isdefined by the macrotick. The macrotick is specified in Chapter “ClockSynchronization”. Specific macrotick boundaries are called actionpoints. These are dedicated instants at which transmissions shall start(in the static segment, dynamic segment and symbol window) and shall end(only in the dynamic segment).

[2562] The lowest level in the hierarchy is defined by the microtickthat is covered in Chapter ‘Clock Synchronization’.

[2563] Communication Cycle Execution

[2564] In the event triggered mode the communication cycle is executedunder the control of a single master. Each node enters a phase calledthe cycle gap immediately after the end of the dynamic segment. If thereis no dynamic segment the cycle gap begins at the end of the staticsegment. In the cycle gap the execution of the communication cycle issuspended until an event indication symbol (EIS) is received. The masterissues the EIS symbol. Upon reception of the EIS symbol all nodes resumeexecution of the communication cycle.

[2565]FIG. 97 illustrates the execution of the event triggeredcommunication cycle.

[2566] Event Indication Symbol (EIS)

[2567] The Event Indication Symbol (EIS) is defined in Chapter ‘Codingand Decoding’. The second falling edge is used as the synchronizationevent (SyncEvent) on master and slave nodes. The EIS symbol is notrequired to be collision resilient. The trigger condition in the EIS isillustrated in FIG. 98.

[2568] Clock Synchronization in Event Triggered Mode

[2569] Principle

[2570] Communication cycle timing in the event triggered mode is basedon the EIS symbol. Since the start of a communication cycle is notpredictable (and therefore the duration of a communication cycle isvariable) there is no notion of time that can be used by the slave nodesto perform a clock rate correction, the EIS is simply used as asynchronizing event by the slave nodes and all subsequent timing isbased on nominal (uncorrected) macroticks based on a timing grid that isset up by the arrival time of the EIS. The following paragraphs definethe details of the clock synchronization for master and slave nodes.

[2571] Clock Synchronization of the Master Node

[2572] After the arrival of the CC trigger event on the master node, thesymbol window starts and the master sends the EIS symbol within thesymbol window at the beginning of the next microtick. While sending theEIS symbol, the timer vEDMTimer is initialized at the SyncEvent pointwith the configuration value pdMasterEIStoEndOfNIT (The parameterpdMasterEIStoEndOfNIT is expressed in microticks to minimize timingjitter.), which describes the duration between the SyncEvent point ofthe EIS and the end of the NIT.

[2573] When the timer vEDMTimer expires at the end of phase b (see FIG.97) the new communication cycle is started, the master initializes themacrotick and microtick counters with 0, and the cycle counter isincremented.

[2574] Beginning with the new cycle the master transmits a frame withID 1. The cycle counter field of this frame is set to the master's localcycle counter.

[2575] Clock Synchronization of the Slave Node

[2576] If a slave is connected to two channels, the first validreception of a EIS symbol on one of the two channels will be taken.

[2577] When a slave recognizes the reception of a valid EIS symbol, thetimer vEDMTimer is provisionally initialized at the SyncEvent point withthe configuration value pdSlaveEIStoEndOfNIT, which quantifies theduration between the SyncEvent point of the received EIS symbol and theend of the NIT (The parameter pdSlaveEIStoEndOfNIT is expressed in termsof the SyncEvent of the received EIS, and therefore should include theeffects of any fixed network propagation delay. The parameter isexpressed in microticks to minimize timing jitter.). The timer vEDMTimerwill be committed when the EIS symbol was correctly received. Theparameter pdSlaveEIStoEndOfNIT is configured during soft reset. When thetimer vEDMTimer expires at the end of phase c (see FIG. 97) the newcommunication cycle is started, the slave initializes the macrotick andmicrotick counters with 0, and the local cycle counter is incremented.Afterwards the slave waits to receive the frame with ID 1.

[2578] Using this procedure all slave nodes that receive the EIS and themaster node switch consistently to the next communication cycle. Duringthe startup phase the process is done in a different way (see below).

[2579] If the slave does not recognize the reception of a valid EISsymbol no action is performed. The local time proceeds until thereception of a new EIS symbol and the timing monitoring (see below) willsignal an error.

[2580] Frame Processing in Event Triggered Mode

[2581] Frame Processing of the Master Node

[2582] The master node shall process frames using the procedure definedin Chapter ‘Frame Processing’ at the beginning of this document.

[2583] Frame Processing of the Slave Node

[2584] If no valid frame with frame ID 1 on at least one channel iscorrectly received in slot 1 after an EIS symbol on a slave node, thenno communication will be performed by that slave node during thecommunication cycle (In this case, “no communication” means that notransmission of frames is possible. Receiving frames can be performed.).This will be indicated by setting S_Trig_Symb_Failure.

[2585] If at least one valid frame with ID 1 is received in slot 1 on aslave node, then the slave applies the frame checks described above withthe exception that the cycle counter checks of slot 1 are handled asdescribed below (In the descriptions below, it is assumed that a frameis only considered valid if all acceptance criteria other than cyclecounter matching are met.):

[2586] Single channel connected slaves

[2587] If the cycle counter of the received frame with Id=1 is not equalto the local cycle counter then the local cycle counter shall be changedto the cycle counter received in frame with ID=1. This will be indicatedby an S_CycleCountError. The frame with ID=1 is accepted normally, andthe remainder of the communication cycle is executed normally.

[2588] In all other cases the local cycle counter shall remainunchanged, the frame shall continue through the acceptance process, andthe communication cycle shall be executed normally

[2589] Dual channel connected slave

[2590] If the cycle counts of all received frames with Id=1 areidentical but not equal to the local cycle counter then the local cyclecounter shall be changed to the cycle counter received in the frameswith ID=1 (If only one frame is received then it is identical bydefault.). This will be indicated by an S_CycleCountError. The frame(s)with ID=1 are accepted normally, and the remainder of the communicationcycle is executed normally.

[2591] In all other cases the local cycle counter shall remainunchanged, the frame(s) shall continue through the acceptance process,and the communication cycle shall be executed normally

[2592] After the first slot, all frames for the remainder of thecommunication cycle shall be processed using the procedure described inChapter “Frame Processing” of this document.

[2593] Monitoring of Cycle Timing

[2594] The FlexRay event triggered mode has two different methods ofmonitoring the timing of the communication system, depending on whethera node is serving as the master or a slave:

[2595] The timing of the CC trigger is monitored by the master.

[2596] The cycle-to-cycle timing of the EIS symbol, sent by the master,is monitored by the slaves.

[2597] Monitoring of the CC Trigger by the Master

[2598] The timing of the CC trigger is monitored by the master using aCC trigger window defined by two configuration parameters,pdExTrigCycleMin and pdExTrigCycleMax. The timing monitoring refers onlyto the external trigger source−the trigger sources ‘host trigger bit’and ‘cycle timer’ do not affect the monitoring. There are threedifferent cases with respect to the arrival of the CC trigger:

[2599] In normal operation the CC trigger appears later thanpdExTrigCycleMin and earlier than pdExTrigCycleMax. No error is signaledand the start of a new communication cycle is initiated by the CCtrigger. The start of a new CC trigger window is computed when the CCtrigger arrives.

[2600] If the CC trigger does not appear before pdExTrigCycleMax, anEXT_TRIG_LIF (CC Trigger Lost Interrupt Flag) error is signaled afterpdExTrigCycleMax. The start of a new trigger window will be determinedonly after the actual arrival of a new CC trigger. As long as no new CCtrigger arrives, no new communication cycle is initiated. It is up tothe host to initiate the communication cycle if needed.

[2601] If the CC trigger appears earlier than pdExTrigCycleMin, theEXT_TRIG_EIF (CC Trigger Early Interrupt Flag) error is signaledimmediately. No communication cycle is initiated, and no new triggerwindow is determined in this case.

[2602] These conditions are depicted in FIG. 99.

[2603] Monitoring of EIS Timing by the Slaves

[2604] The timing of the reception of Event Indication Symbols ismonitored by the slaves through the use on an EIS window defined by twoconfiguration parameters, pdEISSymbCycleMin and pdEISSymbCycleMax. Thereare three different cases with respect to the arrival of the EIS:

[2605] In normal operation the end of the EIS appears later thanpdEISSymbCycleMin but earlier than pdEISSymbCycleMax. No error issignaled. The start of a new EIS window is computed when the end of theEIS arrives.

[2606] If no valid EIS is received such that the end of the EIS appearsbefore pdEISSymbCycleMax, an EIS_SYMB_LIF (EIS symbol Lost InterruptFlag) error is signaled after pdEISSymbCycleMax. When an EIS symbolarrives, the slaves continue with a new communication cycle.

[2607] If the end of the EIS symbol appears earlier thanpdEISSymbCycleMin the early EIS symbol is ignored, and an EIS_SYMB_EIF(EIS Symbol Early Interrupt Flag) error is signaled immediately. Thenode switches into a passive mode, stopping all frame transmission andreception. No new EIS window is computed, and no new communication cycleis initiated. The slave node waits for another EIS symbol afterpdEISSymbCycleMin.

[2608] These conditions are depicted in FIG. 100.

[2609] Startup and Reintegration—Event Triggered Mode

[2610] The following overview describes the CC behavior in the eventtriggered communication mode. Conditions for entering and exiting thesestates are described in Table 52.

[2611] State transitions with a prefix of ‘G’ are global transitions forthe FlexRay protocol.

[2612] State transitions with a prefix of ‘L’ indicate statestransitions corresponding to logical conditions

[2613] State transitions with a prefix of ‘E’ are transitions specificto the event triggered communication mode.

[2614] If a node integrates into a running system or at startup, thecycle counter from the master is accepted without raising an errorindication. The error indication is suppressed until integration issuccessfully completed. TABLE 52 State Transitions - Event TriggeredMode Transition Direction State From To Conditions for Action taken onTransition State State Transition Transition L3 CC_Normal CC_SoftReset ACC_Reset is The ongoing frame requested by the transmission or hostreception is allowed to proceed to completion and the configuration datashall be retained L4 CC_SoftReset Initialization is finished G5CC_SoftReset CC_WaitEIS soft reset released Reset timer for EIS (in therespective symbol monitoring control register) AND Event Triggered slavemode is configured G6 CC_WaitEvent soft reset released Reset timer forevent (in the respective trigger monitoring control register) AND EventTriggered master mode is configured E1 CC_WaitEIS CC_WaitSlaveNITReception of a valid set vEDMTimer to EIS with the endpdSlaveEIStoEndOfNIT, later than set EIS_REC_INT pdEISSymbCycleMininterrupt Reset timer for EIS symbol monitoring E2 CC_WaitEIS Receptionof a valid Signal EIS_SYMB_EIF EIS with the end (EIS symbol Earlyearlier than Interrupt Flag) Error pdEISSymbCycleMin (Note - The EIStimer is not reset by this transition) E3 CC_WaitEIS EIS Timer reachesSignal EIS_SYMB_LIF pdEISSymbCycleMax (EIS symbol Lost without detectingInterrupt Flag) Error a valid EIS (Note - The EIS timer is not reset bythis transition) E4 CC_WaitSlaveNIT CC_WaitID1 vEDMTimer expires ResetvMacrotick, (i.e., microtick counter, pdSlaveEIStoEndOf increment cycleNIT has elapsed) counter E5 CC_WaitID1 CC_NormalSlave Reception of avalid frame with ID 1 (This implies that the cycle counter match checkhas also passed (i.e., the local cycle counter matches the receivedcycle counter).) E6 CC_NormalSlave Reception of a Signal frame with ID 1S_CycleCountError which passes all Error frame checks other The receivedcycle than cycle counter count is applied for the checks local cyclecount value E7 CC_WaitEIS The end of slot 1 Signal was reachedS_Trig_Symb_Failure without having Error received an acceptable frame ID1 message (Acceptable means all frame checks (with the possibleexception of cycle counter match) are passed.) E8 CC_NormalSlaveCC_WaitEIS End of dynamic Reset timer for EIS segment reached symbolmonitoring (vMacrotick==gdCycle- gdNetworkIdleTime-gdSymbolWindow; basedon local timers) E9 CC_WaitEvent CC_WaitMasterNIT CC trigger appearssend EIS symbol later than set EXT_SOR_INT pdExTrigCycleMin interruptset vEDMTimer to pdMasterEIStoEndOfNIT E10 CC_WaitMasterNIT Trigger bitis set by send EIS symbol host set vEDMTimer to pdMasterEIStoEndOfNITE11 CC_WaitEvent CC trigger appears Signal EXT_TRIG_EIF earlier than (CCtrigger Early pdExTrigCycleMin Interrupt Flag) Error AND Trigger sourceis (Note - The CC trigger external event timer is not affected by thistransition) E12 CC_WaitEvent CC trigger timer signal EXT_TRIG_LIFreaches (CC trigger Lost pdExTrigCycleMax Interrupt Flag) Error before aCC trigger (Note - The CC trigger appears timer is not affected by thistransition) E13 CC_WaitMasterNIT CC_NormalMaster vEDMTimer expires ResetvMacrotick, and (i.e., vMicrotick counters, pdMasterEIStoEndOfNITincrement cycle has elapsed) counter, reinitialize error signalingcounters, send frame ID 1 in slot 1 E14 CC_WaitMasterN CC triggerappears Signal EXT_TRIG_EIF IT AND Trigger source is (CC trigger Earlyexternal event Interrupt Flag) Error E15 CC_NormalMaster CC_WaitEventEnd of dynamic Reset timer for event segment reached trigger monitoring(vMacrotick==gdCycle- gdNetworkIdleTime-gdSymbolWindow; based on localtimers) E16 CC_NormalMaster CC trigger appears Signal EXT_TRIG_EIF ANDTrigger source is (CC trigger Early external event Interrupt Flag) Error

[2615] State Diagram

[2616]FIG. 101 shows a protocol state diagram for the event triggeredmode.

[2617] Host Interface Requirements—Event Triggered Mode

[2618] Event triggered mode specific requirements:

[2619] A configuration parameter (e.g. pMasterSelect or consider reusingpSyncMaster) defines whether the node acts as a master or as a slave.

[2620] For the master node three event sources for starting the nextcycle exist: external event, host access, CC internal timer (normalcycle length). The host decides during runtime which event source(s) areused.

[2621] The trigger/event sources external event and CC internal timercan be enabled/disabled independently. If more than one source isenabled, the first event arms the CC to send the EIS symbol. At leastone of the triggers sources has to be enabled.

[2622] Product specific: The behavior of the input signal for theexternal source should be configurable with respect to the trigger type(falling or rising edge) and the assignment to a trigger pin.

[2623] Product specific: Upon detection of the trigger event, the masterCC shall capture the macrotick-counter and present this value to thehost.

[2624] Product specific: Upon reception of the trigger event, the masterCC shall indicate this immediately to the host (Event Trigger).

[2625] Product specific: Upon reception of the event indication symbol,the slaves shall capture their macrotick-counters.

[2626] Upon reception of the event indication symbol, the slave shallindicate this immediately to the host (Event Indication Symbol (EIS)Detected).

[2627] It is required for the host to be able to change the transmitbuffers during the dynamic segment in the following way:

[2628] The data of a buffer may be changed.

[2629] The data and the ID of a buffer may be changed as long as itsorder in the list of dynamic IDs is not changed

[2630] Range of pdExTrigCycleMin: 100 μs . . . 64 ms

[2631] Range of pdExTrigCycleMax: 100 μs . . . 64 ms

[2632] Range of pdEISSymbCycleMin: 100 μs . . . 64 ms

[2633] Range of pdEISSymbCycleMax: 100 μs . . . 64 ms

[2634] General Interrupt Register

[2635] For the event triggered communication mode the interrupt flagsdescribed above are available. Table 53 lists additional interrupt flagsthat are specific to the event triggered communications mode.

[2636] Every interrupt source described in Table 53 shall have anindividual enable/disable mechanism. TABLE 53 Interrupt Registers -Event Triggered Mode General Interrupt Flag Bits Description ChannelEXT_SOR_INT 1 External source interrupt — (master only) EXT_TRIG_EIF 1External Trigger Early Interrupt Flag, — external trigger receivedbefore pdExTrigCycleMin (master only) EXT_TRIG_LIF 1 External TriggerLate Interrupt Flag, — external trigger not received beforepdExTrigCycleMax (master only) EIS_REC_INT 1 EIS symbol detected AEXT_TRIG_EIF 1 EIS symbol Early Interrupt Flag, EIS A received beforepdEISSymbCycleMin EXT_TRIG_LIF 1 EIS symbol Lost Interrupt Flag, A EISnot received before pdEISSymbCycleMax EIS_REC_INT 1 EIS symbol detectedB EXT_TRIG_EIF 1 EIS symbol Early Interrupt Flag, EIS B received beforepdEISSymbCycleMin EXT_TRIG_LIF 1 EIS symbol Lost Interrupt Flag, B EISnot received before pdEISSymbCycleMax

[2637] Note: It is possible to use the external source interrupt(EXT_SOR_INT) even if the external source is not used in order to gatherinformation about the occurrence of external source trigger events.

[2638] Error Management—Master Triggered Mode

[2639] For the event triggered communication mode the error managementdescribed in Chapter “Error Signaling and Error Handling” applies ingeneral. Only the treatment of frame with ID=1 is different. If a framedoes not receive frame ID 1 after a correct EIS symbol, the slave nodeswitches in Error (passive) and stops frame transmission until a nextpair of valid EIS+frame Id 1 is received.

[2640] The error signaling counters are reinitialized during thetransition at the beginning of the new communication cycle.

[2641] Controller Host Interface Example

[2642] Purpose

[2643] This chapter contains an example of a Controller Host Interface(CHI) that meets the Host Interface requirements defined in Chapter‘Controller Host Interface’ and Chapter ‘Controller Host InterfaceServices’.

[2644] Some of these requirements are applicable to all FlexRayimplementations and others are applicable only when specific optionalprotocol mechanisms are implemented.

[2645] Controller Status Registers

[2646] This section enumerates the registers that shall be supported bythe Communication Controller to provide the host with status informationregarding the operation of the controller, and the current value ofdifferent CC internal variables. The current controller status shall beprovided on read request of the host. The status registers holdinginternal variables shall be cleared at the state transitions L1, L5 andL6 of the HW state machine (see Section ‘CC State Diagram’) and shall beupdated by the CC. The host shall have read-only access to the statusinformation. The host is generally not able to modify the contents ofthese registers, with the exception of some error flags, that may becleared by the host.

[2647] Product Version Register

[2648] The CHI shall provide a 16-bit read-only register to hold theFlexRay Product Version Number. This number identifies the manufacturer,the product and the implemented protocol version in order to allow theuser to distinguish between different products. Starting with the MSB,the register shall be used as follows:

[2649] 5 bits to identify the silicon manufacturer

[2650] 4 bits for manufacturer defined silicon versions

[2651] 7 bits to identify the implemented protocol version.

[2652] The semiconductor manufacturer shall agree this version numberwith the FlexRay Consortium.

[2653] Current Cycle Counter Value

[2654] The CHI shall provide a 6-bit register to hold the current cyclecounter value (vCycle). The content shall be incremented by CC at startof cycle.

[2655] Current Macrotick Value

[2656] The CHI shall provide a 16-bit register to hold the currentmacrotick value (vMacrotick). The content shall be incremented by CC andreset at start of cycle.

[2657] Rate Correction Value

[2658] The CHI shall provide an 8-bit register to hold the ratecorrection value (vRateCorrection) applied by the clock sync in thecurrent cycle. (See Section ‘Calculation of the Rate Correction Value’)

[2659] Offset Correction Value

[2660] The CHI shall provide an 8-bit register to hold the offsetcorrection value (vOffsetCorrection) applied by clock sync in thecurrent cycle. (See Section ‘Calculation of the Offset CorrectionValue’)

[2661] Valid Sync Frames Channel A (VSFC_A)

[2662] The CHI shall provide a 5-bit register indicating the number ofvalid Sync Frames received in the previous cycle. The variable shallonly be updated at the end of the static segment with the counter valueVSFC_A.

[2663] Valid Sync Frames Channel B (VSFC_B)

[2664] The CHI shall provide a 5-bit register indicating the number ofvalid Sync Frames received in the previous cycle. The variable shallonly be updated at the end of the static segment with the counter valueVSFC_B.

[2665] Sync Frames used for Clock Sync

[2666] The CHI shall provide a 5-bit register indicating the number ofvalid Sync Frame pairs used for the calculation of the rate correctionterms in the previous cycle. The register shall only be updated at theend of the NIT of the odd cycle with the counter valuevValidSyncFrameCount. (See Section ‘Clock Synchronization—GeneralConcepts’)

[2667] Missing Rate Correction Signal (MRCS)

[2668] The CC shall provide a flag to signal to the host, that no ratecorrection can be performed because no pairs of (even/odd) Sync Frameswere received. The flag shall be reset by the CC after successful ratecorrection. (See Section ‘Missing Rate Correction Signal (MRCS)’)

[2669] Missing Offset Correction Signal (MOCS)

[2670] The CC shall provide a flag to signal to the host, that no offsetcorrection can be performed because no Sync Frames were received in anodd cycle. The flag shall be reset by the CC after successful offsetcorrection. (see Section ‘Missing Offset Correction Signal (MOCS)’)

[2671] Clock Correction Failed Counter (CCFC)

[2672] The CC shall provide a 4-bit counter that is incremented by oneat the end of any odd communication cycle where either the MissingOffset Correction error or Missing Rate Correction error are active. TheCCFC shall be reset to zero at the end of an odd communication cycle ifneither the Offset Correction Failed nor the Rate Correction Failederrors are active. The CCFC stops at 15. (see Section ‘Clock CorrectionFailed Counter (CCFC)’)

[2673] Startup Majority Missed Signal (SMMS)

[2674] The CC shall provide a flag to signal to the host that the CC hasreceived a set of sync frames during startup that did not result in amajority of the sync frames agreeing with the local view of the systemtime (see Section ‘Startup Majority Missed Signal (SMMS)’). The SMMSshall be reset by host interaction or when the CC performs the statetransition L5 or L6 of the HW state machine (see Section ‘CC StateDiagram’).

[2675] Protocol Error State

[2676] The CC shall provide 2 bits indicating the current protocol errorstate. (See Section ‘Protocol Error State Signal’)

[2677] Startup Status Vector

[2678] The CC shall provide a Startup Status Vector with followingstatus flags:

[2679] vCCMS; Coldstart max reached (vColdStartCount=gColdStartMax)

[2680] vSMMS, Plausibility check failed

[2681] vOpViaColdstart; Normal state entered via coldstart path

[2682] vColdStartAborted; Coldstart aborted because of CAS or Sync Framereceived

[2683] vColdstartNoise; Coldstart path has been entered due to theexpiration of pColdstartNoise

[2684] A logical ‘1’ indicates the truth condition for each status flag.

[2685] For details see Section ‘Communication Startup andReintegration’.

[2686] Bus Guardian Schedule Monitoring Error (BGME)

[2687] The CC shall provide a flag to signal a bus guardian schedulemonitoring violation (vBgsmError) to the host. The flag shall be set bythe schedule monitoring mechanism and shall be cleared only by the host.(see Section ‘Bus Guardian Schedule Monitoring Error (BGME)’)

[2688] Clock Correction Limit Reached (CCLR)

[2689] The CC shall provide a flag to signal to the host, that theOffset Correction Value (vOffsetCorrection) has reached the red region(vOffsetCorrection>gOffsetCorrectionOut).

[2690] The CC shall only have the capability to set this flag. The flagshall remain set until it is cleared by the host. (See Section ‘ValueLimitations’ and Section ‘Clock Correction Limit Reached (CCLR)’).

[2691] Media Access Test Warning

[2692] The CC shall provide a flag (pMATestWarning) to signal to thehost, that the CC has received a Media Access Test Symbol (MTS) duringthe symbol window. The CC shall only have the capability to set thisflag. The flag shall remain set until it is cleared by the host.

[2693] Wakeup Status Vector

[2694] The CC shall provide a Wakeup Status Vector with following statusflags:

[2695] Frame Header Received during Wakeup flag(vWakeupFrameHeaderReceived). This flag shall be set if due to thereception of a frame header without coding violation the CC stops thewakeup.

[2696] Wakeup Symbol Received flag (vWakeupSymbolReceived). This flagshall be set if due to the reception of a valid Rx-wakeup symbol the CCstops the wakeup.

[2697] Wakeup Failed flag (vWakeupFailed). This flag shall be set if dueto too many wakeup tries the CC stops the wakeup.

[2698] Wakeup Complete flag (vWakeupComplete). This flag shall be set ifthe CC has completed the transmission of the Tx-wakeup.

[2699] (see Section ‘Cluster Wakeup’ for details)

[2700] Communication Controller Status Vector

[2701] The CC shall provide a Communication Controller Status Vectorwith following status flags indicating the actual operation mode of theCC:

[2702] CC_SoftReset State

[2703] CC_Normal State

[2704] CC_ShutdownRequest State

[2705] CC_Shutdown Complete State

[2706] CC_Standby State

[2707] Listen-Only Mode

[2708] WakeUPListen State

[2709] StartupListen State

[2710] ColdStartICW State

[2711] ColdStartVCW State

[2712] IntegrationVCW State

[2713] PassiveOperation State

[2714] Event Triggered Mode

[2715] The CC shall set the status flag when entering the correspondingstate or operation mode and shall clear it after leaving it, independentof the settings in the different configuration registers. For detailssee below and Sections ‘HW States of the CC’, and ‘Startup StateDiagram—Time Triggered Protocol Mode (TT-D and TT-M)’.

[2716] Configuration and Control Registers

[2717] This section enumerates the registers supported by theCommunication Controller to allow the host to control the operation ofthe CC. The host shall have write and read access to all configurationdata.

[2718] Configuration data shall not be changed by the CC during normaloperation. The CC shall reset the configuration data on its transitionL1 from the CC_HWReset state (see Section ‘HW States of the CC’).

[2719] Module Configuration Register

[2720] The Module Configuration Register (MCR) enables the host toconfigure basic operating modes in the CC. (see Section ‘HW States ofthe CC’) The MCR shall provide the following control bits:

[2721] Soft Reset

[2722] When this bit is set by the host, the CC shall immediately enterthe CC_SoftReset State. Any ongoing transmission or reception shall beaborted and synchronization to the ongoing communication shall bestopped. When this bit is cleared by the host, the CC shall enter theNormal State and start the reintegration or startup. If wake-up isconfigured, the CC shall enter the WakeUPListen State after leavingCC_SoftReset. The CC shall enter the CC_SoftReset State automaticallyafter power on reset. The host shall configure the CC in this state.When the host forces the CC into soft reset, the status and errorregisters should keep their data unchanged until the soft reset isterminated. (Transition L5 and L6 of the HW state machine; see Section‘CC State Diagram’))

[2723] Listen-Only Select

[2724] When this bit (vListenOnly) is set, the CC shall be able toreceive all frames after successful integration to the runningcommunication. In comparison to the normal operation mode the node doesnot actively participate in communication, i.e. neither symbols norframes are transmitted. This bit can be set only in CC_SoftReset Stateto true, but can be cleared any time by the host. (See Section‘Listen-Only Mode’)

[2725] Master Select

[2726] This bit (pSyncMaster) selects the CC as a bus master in theMaster Controlled Operating modes. (See Section 0) The CC shall send theEvent Indication Symbol and the static sync frame when the bit is set.The CC shall ignore any attempt to change the status of this bit whennot in CC_SoftReset State.

[2727] Master Alarm

[2728] If the Master Select and the Master Alarm bits are set, the CCshall send an SAS symbol in the byteflight mode. The bit can be set andreset by the host any time during normal operation.

[2729] Shutdown Request

[2730] When this bit is set by the host, the CC shall enter theCC_ShutdownComplete state (see Section ‘CC_ShutDownComplete State’). Inthis state all internal clocks shall be stopped after finishing thecurrent communication round. The state can be left by the host resettingthe bit.

[2731] Standby Request

[2732] When this bit is set by the host, the CC shall enter theCC_StandByRequest State. In this state all internal clocks shall bestopped after the CC has completed any ongoing transmission andreception. The CC shall leave this state upon the host resetting the bitor upon wake-up activity being signaled by the physical layer on the Rxinput.

[2733] Send Wakeup

[2734] When this bit is set by the host, the CC shall enter WakeUPListenState when leaving the CC_SoftReset State and send the Wakeup Pattern.The CC shall ignore any attempt to change the status of this bit whennot in CC_SoftReset State. (See Section ‘Waking One Channel’)

[2735] Wakeup Channel Select

[2736] With this bit (vWakeupChannel) the host selects the channel onwhich the CC shall send the Wakeup Pattern (‘0’=channel A, ‘1’=channelB). The CC shall ignore any attempt to change the status of this bitwhen not in CC_SoftReset State. (See Section ‘Waking One Channel’)

[2737] Event Triggered Mode Select

[2738] When this bit is set by the host, the CC shall operate in theEvent Triggered Mode. This bit shall be reset by default (=Time DrivenMode), and the CC shall ignore any attempt to change the status of thisbit when not in CC_SoftReset State.

[2739] External Trigger Acceptance

[2740] When this bit is set by the host, the CC shall accept an externaltrigger to send the Event Indication Symbol and the static sync frame inthe Event Triggered Mode, if the CC is configured as a master (MasterSelect bit set). The CC shall ignore any attempt to change the status ofthis bit when not in CC_SoftReset State.

[2741] Message/Frame ID Filtering

[2742] When this bit (gMsgIdFilter) is set by the host, the CC shallapply the configured Message ID filtering for all dedicated receive andFIFO receive mailbox buffers as described in Section 0. If this bit isnot set (by default) the CC shall apply the Frame ID filtering. The CCshall ignore any attempt to change the status of this bit when not inCC_SoftReset State. It should be configured identically in all nodes ofa cluster.

[2743] byteflight Compatibility mode

[2744] This bit selects the byteflight Compatibility mode when set. TheCC shall ignore any attempt to change the status of this bit when not inCC_SoftReset State.

[2745] FIFO Size

[2746] The CC shall provide a register to configure the number of FIFOreceive buffers as a part of all available message buffers. The CC shallignore any attempt to change the content of the register when not inCC_SoftReset. (See below).

[2747] Timing Parameters

[2748] The CHI shall provide three registers to configure the timingparameters TCR1, TCR2, TCR3 required for the byteflight compatibilitymode. These parameters are not used in all the other operating modes ofthe CC.

[2749] TCR1

[2750] 8 bit; to configure the timing parameter pdWx0Rx, a constantcomponent of vdWaitTime in the dynamic section in the case that the mostrecent bus activity was received by the local node; may be modified onlyin CC_SoftReset.

[2751] TCR2

[2752] 8 bit; to configure the timing parameter pdWx0Tx, a constantcomponent of vdWaitTime in the dynamic section in the case that the mostrecent bus activity was transmitted by the local node; may be modifiedonly in CC_SoftReset.

[2753] TCR3

[2754] 10 bit; to configure the timing parameter gdWxDelta a multiplierpart of vdWaitTime. The value chosen must be identical for all nodes inthe cluster, and may be modified only in CC_SoftReset. It shall becalculated as follows:

[2755] gdWxDelta=gdMaxPropagationDelay+gdMaxTolerances

[2756] Clock Prescaler

[2757] The CC shall provide a clock prescaler register consisting of thefollowing three fields:

[2758] Bit Rate Index, 4 bits

[2759] Sample Clock Prescaler, 4 bits

[2760] Samples per bit, 2 bits (8 or 10 samples; 01_(b)=8, 10_(b)=10samples)

[2761] (See Section ‘Coding and Decoding—Configuration Parameters’ fordetails)

[2762] The CC shall accept modifications of the register only inCC_SoftReset.

[2763] Maximum Oscillator Drift

[2764] The CC shall provide a 16-bit register to hold the maximumexpected clock deviation of the oscillator during one communicationcycle (gdMaxDrift) in microticks, configurable only in CC_SoftReset.

[2765] Sample Voting Offset

[2766] The CC shall provide a 4-bit register to configure the offsetfrom the start of the voting window (pVotingOffset) that is used todetermine the value of a received bit from the start of the bit cell.This offset defines the first sample of the bit that shall be consideredfor the voting; configurable only in CC_SoftReset. (See Section ‘BitValue Voting’)

[2767] Voting Samples

[2768] The CC shall provide a 4-bit register to configure the number ofsamples in the voting window (pVotingSamples) that are used to determinethe value of a received bit; configurable only in CC_SoftReset. (SeeSection ‘Bit Value Voting’)

[2769] Nominal Macrotick Length

[2770] The CC shall provide an 8-bit register to hold the nominal(uncorrected) number of microticks per macrotick (pMicroPerMacroNom);may be modified only in CC_SoftReset.

[2771] Bus Guardian Tick

[2772] The CC shall provide a 4-bit register to configure the length ofthe Bus Guardian Tick (BGT) to be provided by the CC to the bus guardianin multiples of the CC microtick; configurable only in CC_SoftReset.

[2773] Static Slot Length

[2774] The CC shall provide an 8-bit register to configure the durationof a static slot (gdslot) in minislots; may be modified only inCC_SoftReset. The static slot length must be identical in all nodes of acluster.

[2775] Static Frame Data Length

[2776] The CC shall provide a 7-bit register to configure the (fixed)frame length (gPayloadLengthStatic) for all frames sent in the staticpart in double bytes; may be modified only in CC_SoftReset. The staticslot length must be identical in all nodes of a cluster.

[2777] Number of Static Slots

[2778] The CC shall provide a 12-bit register to configure the number ofstatic slots in a cycle (gNumberOfStaticSlots); may be modified only inCC_SoftReset. The static slot length must be identical in all nodes of acluster.

[2779] Cycle Length

[2780] The CC shall provide a 16-bit register to configure the durationof one communication cycle (gMinislotPerCycle) in minislots; may bemodified only in CC_SoftReset. The cycle length must be identical in allnodes of a cluster.

[2781] Network Idle Time

[2782] The CC shall provide an 8-bit register to configure the durationof the network idle time (gdNetworkIdle) at the end of the communicationcycle in minislots; may be modified only in CC_SoftReset.

[2783] Start of Latest Transmit

[2784] The CC shall provide a 16-bit register to configure the maximumminislot value (pdLatestTX) allowed before inhibiting new frametransmissions in the dynamic section of the cycle, expressed in terms ofminislots from the beginning of the cycle; may be modified only inCC_SoftReset.

[2785] Transmission Start Sequence Duration

[2786] The CC shall provide a 4-bit register to configure the durationof the Transmission Start Sequence (TSS) (gdTransmissionStartSequence)in terms of bit times (gdBit); may be modified only in CC_SoftReset, andshall be identical in all nodes of a cluster.

[2787] Symbol Window Length

[2788] The CC shall provide an 8-bit register to configure the length ofthe symbol window in minislots; may be modified only in CC_SoftReset.

[2789] Media Access Test Cycle Counter

[2790] The CC shall provide a 6-bit register to configure the cyclecounter value (pMATestCycle) in which the CC shall send the Media AccessTest Symbol (MTS) periodically to perform the Media Access Test.

[2791] Media Access Test Enable

[2792] The CC shall provide a configuration flag (pMATestEnable) toenable the CC to periodically perform the Media Access Test if bit set.The flag shall be reset by default and may be modified only inCC_SoftReset.

[2793] External Clock Correction Acceptance

[2794] The CC shall provide a configuration flag to allow external clockcorrection when set. The flag shall be reset by default after power onreset and may be modified only in CC_SoftReset. The CC shall ignore theexternal clock corrections if this bit is not set.

[2795] Maximum Offset Correction

[2796] The CC shall provide an 8-bit register to hold the maximumpermitted offset correction value (gOffsetCorrectionOut) to be appliedduring regular clock synchronization algorithm; may be modified only inCC_SoftReset. The CC checks the sum of internal and external offsetcorrection against the gOffsetCorrectionOut parameter. (See Section‘Correction Term Calculation—Value Limitations’)

[2797] Maximum Initial Offset Correction

[2798] The CC shall provide an 8-bit register to hold the initial offsetcorrection value (gOffsetCorrectionInitOut) to be applied by the clocksynchronization algorithm in the IntegrationVCW state; may be modifiedonly in CC_SoftReset. (See Section ‘CC_IntegrationVWC State’)

[2799] Maximum Rate Correction

[2800] The CC shall provide an 8-bit register to hold the maximumpermitted rate correction value (gRateCorrectionOut) to be applied bythe internal clock synchronization algorithm; may be modified only inCC_SoftReset. The CC checks the sum of internal and external ratecorrection against the gRateCorrectionOut parameter. (See Section‘Correction Term Calculation—Value Limitations’)

[2801] Cluster Drift Damping

[2802] The CC shall provide a 4-bit register to hold the cluster driftdamping value (pClusterDriftDamping) used in clock synchronization tominimize accumulation of rounding errors; configurable only inCC_SoftReset. (See Section ‘Calculation of the Rate Correction Value’)

[2803] Bus Guardian Enable Duration for BGSM

[2804] The CC shall provide a 12-bit register to configure the duration(pBgenStaticDuration) of the bus guardian enable signal for thetransmission phase of a static slot in macroticks. This shall be checkedby the CC with the BGE signal produced by the bus guardian; may bemodified only in CC_SoftReset. (See Section ‘BG Schedule MonitoringService’)

[2805] Bus Guardian Dynamic Segment Enable Duration for BGSM

[2806] The CC shall provide a 16-bit register to configure the duration(pBgeDynamicDuration) of the bus guardian enable signal for thetransmission phase of the dynamic segment in macroticks. This shall bechecked by the CC with the BGE signal produced by the bus guardian; maybe modified only in CC_SoftReset. (See Section ‘BG Schedule MonitoringService’)

[2807] Bus Guardian Symbol Window Enable Duration for BGSM

[2808] The CC shall provide an 8-bit register to configure the duration(pBgeSymbolDuration) of the bus guardian enable signal for thetransmission phase of the symbol window in macroticks. This shall bechecked by the CC with the BGE signal produced by the bus guardian; maybe modified only in CC_SoftReset. (See Section ‘BG Schedule MonitoringService’)

[2809] BG Schedule Monitoring in Symbol Window

[2810] The CC shall provide a configuration flag (pBgsmSymWinDisabled)to disable bus guardian schedule monitoring during the symbol windowwhen set; may be modified only in CC_SoftReset. (See Section ‘BGSchedule Monitoring Service’)

[2811] BG Schedule Monitoring in Dynamic Segment

[2812] The CC shall provide a configuration flag (pBgsmDynSegDisabled)to disable bus guardian schedule monitoring during the dynamic segmentwhen set; may be modified only in CC_SoftReset. (See Section ‘BGSchedule Monitoring Service’)

[2813] Timer Interrupt Configuration Registers

[2814] The CC shall provide two Timer Interrupt Configuration Registersto enable the host to configure two different timer interrupts. Eachregister shall contain three fields:

[2815] Cycle Set—A 9-bit register is used to specify in which set ofcycles the interrupt shall occur. It consists of two fields, the BaseCycle [b] and the Cycle Repetition [c]. The set of cycle numbers wherethe interrupt is to be generated is determined from these two fieldsusing the formula

b+n*2{circumflex over ( )}c (n=0, 1, 2, . . . ):

[2816] Base Cycle [b]—A 6-bit cycle number used to identify the initialvalue for generating the cycle set

[2817] Cycle Repetition [c]—A 3-bit value used to determine a constantrepetition factor to be added to the base cycle (c=0 . . . 6).

[2818] Macrotick Offset—This 16-bit value is the macrotick offset fromthe beginning of the cycle where the interrupt is to occur. Theinterrupt occurs at this offset for each cycle in the Interrupt CycleSet.

[2819] Transmitter Generated Padding Switch

[2820] In the CC a configuration switch decides whether the transmittermay add missing data bytes if the configured frame data length exceedsthe length of the buffer data field. The configuration switch applies toall transmit buffers of the CC. The flag shall be disabled (logical ‘0’)by default, may be enabled (logical ‘1’) only in CC_SoftReset.

[2821] Cold Start Max

[2822] The CC shall provide an 8-bit register to configure the maximumnumber of cycles (gColdStartMax) that a cold starting node is permittedto try to start up the network without receiving any valid response fromanother node; configurable only in CC_SoftReset. If the value is ‘0’ theCC is not allowed to start up the communication.

[2823] Cold Start Inhibit

[2824] The CC shall provide a configuration flag (vColdStartInhibit) todisable the cold starting of a node during wake-up when set. (SeeSection ‘ColdStart-Inhibit Mode’)

[2825] Max. without Clock Correction Passive

[2826] The CC shall provide a 4-bit register configurable with thenumber of cycles without performing rate correction(gMaxWithoutClockCorrectionPassive) when the CC shall enter the “Yellow”state. The register can be configured only in CC_SoftReset. (See Section‘Error Handling for TT-D and TT-M Protocol Modes’)

[2827] Max. Without Clock Correction Fatal

[2828] The CC shall provide a 4-bit register configurable with thenumber of cycles without performing rate correction(gMaxWithoutClockCorrectionFatal) when the CC shall enter the “Red”state. The register can be configured only in CC_SoftReset. (See Section‘Error Handling for TT-D and TT-M Protocol Modes’)

[2829] Wake-up Symbol Definition Registers

[2830] The CHI shall provide following registers to configure theparameters needed by the CC to send and receive the wake-up symbol:

[2831] 6 bits; to configure the duration of the active low level(gdWakeupSymbolTxLow) of the wake-up symbol in multiples of bit times(gdBit); may be modified only in CC_SoftReset.

[2832] 8 bits; to configure the duration of the idle/recessive highlevel (gdWakeupSymbolTxIdle) of the wake-up symbol in multiples of bittimes (gdBit); may be modified only in CC_SoftReset.

[2833] 4 bits; to configure the number of repetitions (sequences)(pdWakeupPattern) of the wake-up symbol; may be modified only inCC_SoftReset.

[2834] 6 bits; to configure the minimum duration of the active low level(gdWakeupSymbolRxLow) in multiples of bit times (gdBit) for the receiverto recognize the symbol as a wake-up; may be modified only inCC_SoftReset.

[2835] 6 bits; to configure the minimum duration of the idle/recessivehigh level (gdWakeupSymbolRxIdleMin) in multiples of bit times (gdBit)for the receiver to recognize the symbol as a wake-up; may be modifiedonly in CC_SoftReset.

[2836] 9 bits; to configure the window length within which the symbolhas to be received (gdWakeupSymbolRxWindow) in multiples of bit times(gdBit) for the receiver to recognize the symbol as a wake-up; may bemodified only in CC_SoftReset.

[2837] 4 bits; to configure the maximum number of times (gWakeupMax) theCC is permitted to autonomously attempt to send a wake-up pattern; maybe modified only in CC_SoftReset.

[2838] 6 bits; to configure in multiples of bit times (gdBit) theduration of the active low level on the bus (gdWakeupMaxCollision) thata CC sending a wake-up pattern shall accept during the idle phase of thepattern without reentering the WakeupListen state; may be modified onlyin CC_SoftReset.

[2839] (See Section ‘Cluster Wakeup’)

[2840] Communication Delay Registers

[2841] The CC shall provide two 8-bit registers to configure the averagedelay compensation values for each channel (pDelayCompensationChx) inmicroticks; configurable only in CC_SoftReset. (See Section ‘TimeMeasurement’)

[2842] Buffer Control Register

[2843] The configuration of the message mailbox buffers (as Transmit,Dedicated Receive or FIFO Receive buffer) and host's access to themailbox message buffers shall be controlled by the use of a BufferControl Register.

[2844] (See below for implementation guidelines)

[2845] Clock Correction Registers

[2846] This section enumerates the registers the CommunicationController shall provide to allow external clock correction by the host.The host shall have write and read access to these registers.

[2847] The CC shall have read-only access during normal operation. TheCC shall reset the configuration data during power on reset.

[2848] External Offset Correction

[2849] The CC shall provide an 8-bit register to hold the external clockoffset correction value (vOffsetCorrectionExtern) in microticks to beapplied by the internal clock synchronization algorithm when theExternal Clock Correction Acceptance bit is set (See above). Theregister content is supposed to be written by the host before start ofthe Network Idle Time (NIT) and it shall be consumed when applied by theCC. (See Section ‘External Clock Synchronization (Optional)’)

[2850] External Rate Correction

[2851] The CC shall provide an 8-bit register to hold the external clockrate correction value (vRateCorrectionExtern) in microticks to beapplied by the internal clock synchronization algorithm when theExternal Clock Correction Acceptance bit is set (See above). Theregister content is supposed to be written by the host before start ofthe Network Idle Time (NIT) and it shall be consumed when applied by theCC. (See Section ‘External Clock Synchronization (Optional)’)

[2852] Message Buffers

[2853] The communication controller has to provide an implementationspecific number of configurable message buffers for data communicationwith an implementation specific frame length up to the maximum of 254data bytes. The message buffers shall be configurable to be used astransmit, dedicated receive or FIFO receive buffers. Each buffer shallinclude the complete frame header and data field, and shall not includethe frame CRC (See Section ‘FlexRay Frame Format’ for details). The CCshall provide suitable mechanisms to grant a secure access to thebuffers. Using a suitable mechanism, either the CC or the host shall getaccess to one particular buffer. A predefined number of buffers shall beconfigurable during CC_SoftReset only while the others shall bereconfigurable during runtime.

[2854] Transmit Buffers

[2855] A portion of message buffers shall be configurable as transmitbuffers.

[2856] There shall be one explicit transmit buffer, which is dedicatedto be configured to hold the transmitted Sync frame of a node, if ittransmits one, and which can be reconfigured only in CC_SoftReset. Thisshall ensure that for Sync Frames, the Sync Frame ID, Sync Bit, PayloadLength and the corresponding header CRC can be changed only duringCC_SoftReset, and that any node transmits at most one Sync frame percommunication cycle. The CC shall provide mechanisms that do not allowthe transmission of sync frames from other buffers.

[2857] For transmit frames in the dynamic segment reconfigurable bufferscan be used. The frame ID, the header CRC, and the corresponding PayloadLength shall be reconfigurable during runtime.

[2858] The CC shall not have the capability to calculate the transmitheader CRC. The host is supposed to provide the frame IDs and headerCRC's for all transmitted frames.

[2859] The CC shall not permit any write access by the host to the NullFrame Indication Bit.

[2860] The length field in all messages (static and dynamic) reflectsthe frame payload data length as defined in the frame format. The CC mayuse mailbox transmit buffer structures shorter than the actualconfigured data frame length in the static segment. In this case, the CCshall generate padding bytes—if enabled—to ensure that frames haveproper physical length. However, this capability must be enabled viaconfiguration (See above). The padding pattern shall be logical zero.The padding function shall apply only to frames to be transmitted in thestatic part. In the dynamic part no frame shall be transmitted if thedata field in the buffer is shorter than the configured data length.

[2861] An indicator shall be provided for each transmit message bufferto indicate if the message was transmitted by the CC, respectivelyupdated by the host. The host shall explicitly set this “Commit” flagwhen the buffer is ready for transmission. In the “Single-shot Mode” theCC shall reset the flag after transmission has been completed and thehost may access the buffer for writing next message into the buffer.This hand-shaking flag shall be reset on the CC's transition from theCC_HWReset state (See Section ‘CC_HWReset State’).

[2862] The CC shall not transmit frame data from a buffer that the hostis updating. The CC shall not transmit the message data out of thebuffer before the host has indicated that the update is completed bysetting the “Commit” flag.

[2863] Null Frame Transmission

[2864] The CHI shall provide for each transmit buffer a flag to allowthe host to configure the transmission mode for the buffer. If this bitis set, the transmitter shall operate in the static segment in theso-called “Single-shot Mode”. If this bit is cleared, the transmittershall operate in the static segment in the so-called “Continuous Mode”.

[2865] If a buffer is configured in the “Single-shot Mode”, theconfigured frame will be sent out by the transmitter only once after thehost has set the “Commit” flag. As defined above, the CC resets the flagafter transmission. If the host does not set the “Commit” flag beforetransmit time and there is no other transmit buffer with matching frameID and cycle counter filter, the CC shall transmit a Null Frame with theNull Frame bit (fNullFrameIndicationBit) set and the payload data set to‘0’.

[2866] If a buffer is configured in the “Continuous Mode”, the CC shallnot reset the “Commit” flag after transmission. If the “Commit” flag isset, the frame shall be sent out any time the frame ID and cycle counterfilter match. If the host clears the “Commit” flag and there is no othertransmit buffer with matching frame ID and cycle counter filter, the CCshall transmit a Null Frame with the Null Frame bit(fNullFrameIndicationBit) set and the payload data cleared.

[2867] If a static slot is assigned to the CC, it shall transmit a NullFrame with the Null Frame Indication Bit (fNullFrameIndicationBit) set,and the rest of the frame header and the frame length unchanged (SeeSection ‘Null Frame Indication Bit’) in any of the following cases:

[2868] There are matching frame IDs and cycle counters, but none ofthese transmit buffers has the “Commit” flag set.

[2869] All transmit buffers configured for the slot have cycle filtersthat do not match the current cycle (see below).

[2870] Null Frames shall not be transmitted in the dynamic segment.

[2871] Receive Buffers

[2872] A portion of the CC's message buffers shall be configurable asdedicated receive buffers.

[2873] The CC shall transfer only valid received messages from theserial receive message buffer to the dedicated receive buffer with thematching filter configuration (See below).

[2874] A receive message buffer shall contain space for all frameelements as defined in Chapter ‘Frame Formats’, except the frame CRC.

[2875] The payload length information presented to the host shallreflect the length indicated by the received payload length code, notany other value.

[2876] If no frame, null frame, or corrupted frame is received in aslot, the buffer contents prior to the reception shall not be deleted oroverwritten. The discrepancy to the configured frame should be signaledto the host using a suitable bit in the corresponding buffer statusregister.

[2877] An indicator shall be provided for each dedicated receive messagebuffer to indicate if it contains new data (updated by the CC since lastread). The host is responsible for clearing this flag after the readoperation.

[2878] The CC shall not store frame data into a dedicated receive bufferthat the host is reading.

[2879] The host shall not have write access to the dedicated receivebuffers during normal operation. The host shall have write access to thededicated receive buffers only while configuring the buffer inCC_SoftReset with the needed parameters for the dedicated receiveprocess.

[2880] Null Frame Reception

[2881] The payload of a received Null Frame shall not be copied into thematching mailbox receive buffer. The reception of the Null Frame shallbe signaled to the host by setting an appropriate bit in the receivebuffer status register. (See below)

[2882] FIFO Receive Buffers

[2883] A portion of the CC's message buffers can be configured as FIFOreceive buffers.

[2884] The CC shall transfer only valid received messages from theserial receive message buffer to the FIFO receive buffer if there is nomatching dedicated receive buffer and the header is not rejected by theFIFO Rejection filter (See below).

[2885] A FIFO receive message buffer shall contain all frame elements asdefined in Chapter “Frame Formats”, except the frame CRC.

[2886] An indicator shall be provided to indicate that a message wasstored in a FIFO receive buffer by the CC. The indicator shall providethe information ‘FIFO not empty’. The CC shall reset the flag after allmessages have been accessed by the host.

[2887] The CC shall not store frame data into a FIFO receive buffer thatthe host is reading. The data shall be stored into the next free FIFObuffer.

[2888] Frame Status and Error Information (FSEI)

[2889] There shall be dedicated frame status and error informationassociated with each message buffer. The Frame Status and ErrorInformation contains 8 bits which are summarized in the following Table54: TABLE 54 Frame Status and Error Vector FIFO Status/Error Flag BitsTx Buffer Rx Buffer Buffer Null Frame (static 1 Null Frame Null Framereceived Null Frame segment only) transmitted received Empty Slot(static 1 — No bus traffic detected — segment only) Bit Coding/CRC Error1 — Error detected (bit coding, header — or frame CRC, in static segmentonly) Length Mismatch 1 — Length Mismatch detected (static — segmentonly) Slot Mismatch 1 — Slot Mismatch detected — Cycle Counter 1 — CycleCounter Mismatch detected — Mismatch (static segment) TransmissionConflict 1 Start of Start of Transmission during — transmission ongoingReception during ongoing reception Empty Slot on second 1 — No bustraffic detected on the — channel other channel (static segment only)Receive Error on 1 — Receive Error detected on the — second channelother channel (static segment only)

[2890] The vector content shall be updated at the end of thecorresponding slot (defined by the configured Frame ID, See Section‘Frame Status and Error Information (FSEI)’) by the communicationcontroller and can be checked by the host. The flags shall be set if oneof the listed errors is detected by the communication controller duringthe frame acceptance checks. (See Chapter “Frame Processing”) The vectorcontent shall always show the status of the latest slot, which meansthat errors from previous cycles shall be overwritten.

[2891] The first seven flags refer specifically to the configuredchannel, on that the frame shall be received (see below), while theother two refer to the other channel.

[2892] In searching for Frame ID matches, searching shall commence withthe first receive buffer. It shall proceed incrementally through theremaining receive buffers. If more than one receive buffer holds thesame Frame ID and cycle counter filter, the error vector shall beupdated in the first matching buffer.

[2893] Filtering and Masking

[2894] Definitions

[2895] Frame Filtering

[2896] Frame filtering shall be done by checking specific fields in aframe against corresponding configuration constants in the buffer, withthe stipulation that the received frame shall only be processed furtherif the required matches occur. Otherwise, it shall be discarded. Framesshall be filtered on the following frame fields:

[2897] Channel Number

[2898] Frame Id

[2899] Cycle Counter

[2900] Message Id

[2901] Frame Filter Mask

[2902] The CC shall provide a mechanism to mask the frame filters. Thefiltering parameters masked by the host shall be disregarded (set to“don't care”).

[2903] Filtering Mechanisms

[2904] The filtering mechanisms described below shall be applieddifferently for receive and transmit message buffers

[2905] Receive buffer: In order to store a message the filters forchannel Id, and cycle counter must match. In addition, depending on theconfiguration bit gMsgIdFilter (see Section 0) either the Frame Id(gMsgIdFilter=‘0’) or the Message Id (gMsgIdFilter=‘1’) must match (butnot both).

[2906] Transmit buffer: A frame shall be transmitted in the time slotcorresponding to the frame ID on the configured channel(s) if the cyclecounter matches the configured cycle filter value.

[2907] Channel Filtering

[2908] There shall be a Channel Filtering field (2 bits) associated witheach buffer. It serves as a filter for a receive message buffer, and asa control field for a transmit message buffer.

[2909] Depending on the buffer configuration (see Table 55)

[2910] Receive buffer: received frames shall be stored if they arereceived on all the specified in the Channel Filtering Field. Otherfiltering criteria must also be met.

[2911] Transmit buffer: the content of the buffer is transmitted only onthe channels specified in the Channel Filtering Field when the CycleCounter Filtering and Frame Id Filtering criteria are also met. TABLE 55Channel Filtering Configuration Tx Buffer Rx Buffer Config. bit AConfig. bit B Transmit frame Store valid Rx frame 1 1 on both channelsreceived on channel A or B (pick first valid) 1 0 on channel A receivedon channel A 0 1 on channel B received on channel B 0 0 no transmissionignore frame

[2912] Frame ID Filtering

[2913] Every Transmit and dedicated Receive message buffer shall containa frame ID. This frame ID shall be used differently for receive andtransmit message buffers.

[2914] Receive message buffers: A received message is stored in thefirst receive message buffer where the received frame ID matches thereceive mailbox frame ID, provided gMsgIdFilter=‘0’ and the otherreceive filtering criteria are also met. If Message Id filtering isbeing used (gMsgIdFilter=‘1’), this filter is not applied.

[2915] For Transmit buffers the frame ID in the buffer is used todetermine the appropriate slot for the message transmission. The frameshall be transmitted in the time slot corresponding to the frame ID,provided the channel and cycle counter criteria are also met.

[2916] Cycle Counter Filtering

[2917] Cycle Counter Filtering is based on the notion of a Cycle Set.For filtering purposes, a match shall be detected if any one of theelements of the set is matched.

[2918] Cycle Set—A 9 bit register is used to specify which cycle numbersare elements of the set. It consists of two fields, the Base Cycle [b]and the Cycle Repetition [c]. The set of cycle numbers belonging to theset shall be determined from these two fields using the formula

b+n*2{circumflex over ( )}c (n=0, 1, 2, . . . ):

[2919] Base Cycle [b]—A 6 bit cycle number used to identify the initialvalue for generating the cycle set

[2920] Cycle Repetition [c]—A 3 bit value used to determine a constantrepetition factor to be added to the base cycle (c=0 . . . 6).

[2921] The operation of the filtering mechanism depends on theconfiguration of the buffer:

[2922] Receive buffer: The received message is stored only if thereceived cycle counter matches an element of the buffer's Cycle Set.Channel, Frame Id or Message Id criteria must also be met.

[2923] Transmit buffer: The content of the buffer is transmitted when anelement of the Cycle Set matches the current cycle counter and the frameID matches the slot counter value. If the cycle counter does not matchany cycle counter filter criteria from the configured transmit bufferswith matching frame ID, a Null Frame shall be transmitted in the staticsegment. (See below).

[2924] Message ID Filtering

[2925] Message ID filtering applies only for receive message buffers andshall be used by the CC if the message Id filtering is configured(gMsgIdFilter=‘1’) (see above). For message ID filtering the first twodata bytes out of the receive buffer shall be used. The received frameshall be stored in the configured receive buffer if the message ID,channel and cycle counter match. The frame ID shall be stored in thebuffer, but ignored for filtering.

[2926] There shall be no message ID filtering used for frametransmission.

[2927] FIFO Filtering

[2928] For FIFO filtering there shall be one Rejection Filter and oneRejection Filter Mask available. Each register consists of 39 bits forchannel (2 bits), frame ID (12 bits), cycle counter (9 bits), andmessage ID (16 bits). The two registers shall be reconfigurable only inCC_SoftReset.

[2929] A received frame shall be stored in the next free FIFO buffer ifthe channel, frame ID, cycle counter, and message ID are not rejected bythe configured reject and mask reject filter and if there is no matchingdedicated receive buffer available.

[2930] General Interrupts

[2931] Interrupts shall be triggered almost immediately when an error isdetected by the controller, a frame is received or transmitted, or aconfigured timer interrupt is activated. This enables the host to reactvery quickly on specific error conditions, timers and events. The CCshall support disable/enable controls for each individual interrupt,separately and as a whole.

[2932] Tracking status and generating interrupts when a status changeoccurs shall be two independent tasks. Regardless of whether aninterrupt is enabled, or not, the corresponding status should be trackedand indicated by the CC.

[2933] At least one hardware interrupt line shall be available to signalan interrupt to the host.

[2934] General Interrupt Register

[2935] The communication controller shall provide a General Interruptand Error Indication Register. TABLE 56 General Interrupt RegisterGeneral Interrupt Flag Bits Receiver Channel Bit Coding/CRC Error 1Error detected (bit coding, A header or frame CRC) Slot Mismatch 1 SlotMismatch detected A Cycle Counter 1 Cycle Counter Mismatch A Mismatchdetected Length Mismatch 1 Length Mismatch detected A Unaccepted Symbol1 Unexpected symbol reception A Symbol Normal 1 Symbol Normal received ASymbol Alarm 1 Symbol Alarm received A Bit Coding/CRC Error 1 Errordetected (bit coding, B header or frame CRC) Slot Mismatch 1 SlotMismatch detected B Cycle Counter 1 Cycle Counter Mismatch B Mismatchdetected Length Mismatch 1 Length Mismatch detected B Unaccepted Symbol1 Unexpected symbol reception B Symbol Normal 1 Symbol Normal received BSymbol Alarm 1 Symbol Alarm received B

[2936] The flags shall be set when the communication controller detectsone of the listed errors or events. (See Sections ‘Channel Status andError Information (CSEI)’ and ‘Frame Reception’) If the host checks thevector, it must reset the values so that the CC can update them.

[2937] The communication controller shall provide a General ErrorInterrupt, which shall be triggered when any of the flags is set,provided the corresponding interrupt is enabled.

[2938] General Interrupt Enable Register

[2939] The CC shall provide for each general interrupt indication flag aGeneral Interrupt Enable flag. The settings in the General InterruptEnable Register determine which status changes in the General InterruptRegister shall result in an interrupt.

[2940] Receive Interrupt Status Register

[2941] The communication controller shall provide a Receive InterruptStatus Register to indicate the reception of a valid frame (stored inone of the receive buffers), a Collision Avoidance Symbol (CAS), aWake-up Symbol, a Media Access Test Symbol (MTS), an Event IndicationSymbol (EIS), a Status Normal Symbol (SNS), a Status Alarm Symbol (SAS)or an optical diagnosis signal (when using an optical physical layer).The flags shall be set by the CC when a corresponding event occurs. Ifenabled, an interrupt is pending while one of the bits is set. If thehost checks the vector, it must reset the values so that the CC canupdate them.

[2942] Following read-only bits shall be readable by host:

[2943] Receive Interrupt Flag

[2944] The flag shall be set by the CC when a frame was received andstored in one of the dedicated receive buffers.

[2945] Receive FIFO Not Empty Interrupt Flag

[2946] The flag shall be set by the CC when a frame was received andstored in one of the FIFO buffers.

[2947] Receive FIFO Overrun Interrupt Flag

[2948] The flag shall be set by the CC when a Receive FIFO Overrun wasdetected.

[2949] Collision Avoidance Symbol Interrupt Flag

[2950] The flag shall be set by the CC when a CAS was received.

[2951] Wake-up Symbol Interrupt Flag

[2952] The flag shall be set by the CC when a Wake-up Symbol wasreceived.

[2953] Media Access Test Symbol Flag

[2954] The flag shall be set by the CC when a MTS was received.

[2955] Event Indication Symbol Flag

[2956] The flag shall be set by the CC when an EIS was received.

[2957] Optical Diagnosis Flag

[2958] The flag shall be set by the CC when an optical diagnosis signalwas received.

[2959] Status Normal Symbol Flag

[2960] The flag shall be set by the CC when a SNS was received.

[2961] Status Alarm Symbol Flag

[2962] The flag shall be set by the CC when a SAS was received.

[2963] Network Management Vector Change Flag

[2964] The flag shall be set by the CC when the optional NM services areimplemented, and a change in the NM vector occurred. (See below)

[2965] Receive Interrupt Enable Register

[2966] The communication controller shall provide a Receive InterruptEnable Register to enable each of the Receive Interrupt Status Registerflags separately. The settings in the Receive Interrupt Enable Registerdetermine which status changes in the Receive Interrupt Status Registershall result in an interrupt.

[2967] General Error and Status Interrupt Enable Register

[2968] The CC shall provide an interrupt enable flag to individuallyenable each of the following status and errors:

[2969] Clock Correction Failure; This flag enables an interrupt wheneverone of the following errors occur:

[2970] Missing Rate Correction Signal (MRCS)

[2971] Missing Offset Correction Signal (MOCS)

[2972] Clock Correction Failed Counter (CCFC) stopped at 15

[2973] Clock Correction Limit Reached (CCLR)

[2974] The interrupt shall be raised at the end of the cycle after thelisted errors have been checked.

[2975] Protocol Error State; This flag enables an interrupt whenever theerror state will change from “Green” to “Yellow” or to “Red”.

[2976] Startup: This flag enables an interrupt whenever one of thefollowing events occur:

[2977] Coldstart max reached

[2978] Coldstart path has been entered due to the expiration ofpStartupNoise

[2979] Normal state entered via coldstart path

[2980] Plausibility check failed (during startup)

[2981] Bus Guardian Schedule Monitoring Error (BGME)

[2982] Media Access Test Warning

[2983] Wakeup; This flag enables an interrupt whenever one of thefollowing events occur:

[2984] Frame Header Received during Wakeup

[2985] Wakeup Symbol Received

[2986] Wakeup Failed

[2987] Wakeup Complete

[2988] The settings in the General Error and Status Interrupt EnableRegister determine which status or error flags changes shall result inan interrupt. (See above)

[2989] Requirements for Optional Mechanisms

[2990] Network Management Services

[2991] If NM services are supported, the CHI shall provide thefollowing:

[2992] four bits to configure the length of the NM vector(gNetworkManagementVectorLength), (0 to 12 bytes); may be modified onlyin CC_SoftReset. The configured length must be identical in all nodes ofa cluster.

[2993] one bit to configure the starting point of the NM vector in thedata field (byte 0 if bit not set, byte 2 if bit set); may be modifiedonly in CC_SoftReset. The configured starting point must be identical inall nodes of a cluster.

[2994] one register (with in the implementation specified 8 to 12 bytes)to hold the NM vector as a result of a logical OR operation over allreceived NM vectors in the previous cycle. The CC shall perform the ORoperation over all NM vectors out of all received NM frames with thefNMIndicationBit set. (See Section ‘Network Management Indication Bit’)The CC shall update the NM vector at the end of the cycle.

[2995] one interrupt flag to signal a change in the NM vector visible tothe host.

[2996] one interrupt enable bit.

[2997] Optical Diagnosis Flags

[2998] If the optical diagnosis service is supported, the CHI shallprovide the following:

[2999] Two Optical Diagnosis Flags (one for each channel)

[3000] The flags shall be set by the CC when too low optical power wasreceived by the optical transceiver and signaled to the CC.

[3001] If the host checks the flags, it must reset them so that the CCcan update them.

[3002] Implementation Example

[3003] Mailbox Buffer Control Register Fields

[3004] The CHI shall provide one Buffer Control Register to configurethe message mailbox buffers (as Transmit, Dedicated Receive or FIFOReceive buffer) and to control host's access to the message buffers.

[3005] This control register shall provide one byte for each mailboxbuffer. TABLE 57 Mailbox Buffer Control Register Fields Contr 1 FIFOFlag Bits Tx Buffer Rx Buffer Buffer Comment CFG 1 ‘1’ = Transmit Buffer‘0’ = Receive Buffer ‘0’ Message Buffer Configuration Bit CFG_SR 1 ‘1’ =Mailbox Buffer ‘1’ = Buffer and the — ‘0’ = Mailbox and the associatedfilter associated filter can Buffer and the can be configured only beconfigured only associated filter during CC_SoftReset. duringCC_SoftReset. can be configured during normal operation. Transmis- 1 ‘1’= Single-shot Mode    — — only for static sion Mode (transmit Null Frameif slots buffer not updated, Commit flag = ‘0’) ‘0’ = Continuous Mode(See above) Commit 1 ‘0’ = buffer not ‘1’ = buffer updated — Commit FlagFlag updated, ‘1’ = buffer (valid), ‘0’ = not committed for updated;Host shall transmission; Host explicitly clear the explicitly sets theflag after reading the Commit flag when the data. buffer is ready fortransmit. The Commit flag is reset by the CC after transmission has beencompleted in the “Single-shot” mode only. (See above). IENA 1 ‘1’ =Interrupt enabled ‘1’ = Interrupt — Commit Interrupt enabled EnableABTRQ 1 ‘1’ = Abort request;    — — Abort Request Message shall beaborted at next start of cycle if transmission has not been startedbefore. ABTAK 1 ‘1’ = Message has    — — Abort been aborted. AcknowledgeLOCK 1 ‘1’ = lock, ‘0’ = ‘1’ = lock, — Message Buffer release ‘0’ =release Lock. A locked buffer is visible to the host.

[3006] (Note: The host can modify the control flags CFG and CFG_SR onlyduring CC_SoftReset.)

[3007] Indication of Bus Events

[3008] The communication controller shall provide additional outputsignals to indicate the following events: TABLE 58 Bus Event IndicationEvent Description Status Normal Symbol SET_SNSIF (SNS)detected on busStatus Alarm Symbol (SAS) SET_SASIF detected on bus Correct message wasreceived SET_RCVMSG, even if message which may be copied into a is notcopied into any buffer receive buffer (in case no adequate receivebuffer is configured) One of following errors detected SET_ERRIF duringthe receive process: S_TssViolation, S_HeaderCodingError,S_InvalidHeaderCRC, S_FrameCodingError, S_InvalidFrameCRC. (See Section‘Syntactical Correctness’) Slot mismatch detected SET_SLMM(S_FrameIDError). (See Section ‘Frame Acceptance’)

[3009] The exact attribution of events to interrupt vectors or linesshall be described in the documentation of the respective communicationcontroller implementation.

[3010] In order to enable error monitoring in a star node thecommunication controller shall provide four output signals with thesetting of internal status flags indicated by means of a pulse.

[3011] The FIG. 102 shows which internal events should be indicatedexternally as SLMM, ERR, ROK and SOC signals.

[3012] If an internal event is indicated, the corresponding signal shallbe switched to the active state for a defined time, in order to generatea short logical “1” signal with a duration of at least 50 ns.

[3013] The SLMM signal confirms the reception of a frame with a correctformat and correct CRC, even if the frame identifier deviates from theslot counter value at reception time.

[3014] The ERR signal indicates an error as described above.

[3015] The ROK signal indicates that a correct frame or a valid symbolhas been received even if the message was not copied into a buffer inthe communication controller.

[3016] The SOC signal confirms that a valid SOC symbol (Normal or Alarm)has been received or sent. It can be used to trigger timers or to startsynchronized software tasks with every SOC.

[3017] Every communication controller should be able to generate atleast the signals ERR, ROK and SOC.

[3018] System Parameters

[3019] The following parameters are used in the description of thepresent invention. Any values and ranges of the parameters are given byway of example and imply no restriction what so ever.

[3020] Protocol Constants Name Description Value Unit cControllerMax Themaximum number of 64 — nodes in a cluster cCycleMax The maximum cyclecounter 63 — in a cluster cMaxChannels The maximum number of 2 —supported channels cPaddingValue Value of the data byte 0 — used forpadding of static frames in case pMaxPayloadLength is smaller thanfPayloadLength cPayloadLengthMax Maximum length of the 127 2-bytepayload segment of a frame words cSlotIDMax The highest slot ID number4095 — cStarCouplersMax The largest allowed number of 3 — cascaded starcouplers between any two nodes in a cluster cSyncNodeMax The maximumpossible number TBD — of sync nodes

[3021] Global Cluster Constants Name Description Range Unit gChannelsThe number of channels supported by the  1-cMaxChannels — cluster. Note:there is also a node constant pChannels, which reflects the connectivityof each specific node gColdStartMax The maximum number of times that anode  0-TBD — in this cluster is permitted to attempt to start thecluster by initiating schedule synchronization gdActionPointOffset Theoffset of the action point  1-TBD MT gdBGArmActive Duration of the BusGuardian ARM signal low 1 MT condition gdBGDynSegment Bus Guardiandynamic segment length  0-65534 MT gdBGpostEnablePart Bus Guardian ISGpart that follows a guarded  0-TBD MT schedule element gdBGpreEnablePartBus Guardian ISG part that precedes a  0-TBD MT guarded schedule elementgdBGStaticSlot Bus Guardian Static slot length (Does not 0 to 4095 MTinclude the inter-slot gap.) gdBGSymbolWindow Bus Guardian symbol windowlength 0 to 255 MT gdBGWatchdogDisable Bus Guardian watchdog disabletime 1 to 255 MT gdBit The configured duration of one bit. The value TBDns is derived from gBitRate. gdCycle The duration of one communicationcycle in 250-64000 μS this cluster gdCycleMax Maximum duration of abyteflight TBD ?? communication cycle gdCycleMIn Minimum duration of abyteflight TBD ?? communication cycle gdDynamicSlotIdlePhase Theduration of the dynamic slot idle phase  1-TBD MinislotsgdInitialColdStartPhase Period for which a node remain in 3* gdCycle +gdSlot MT CC_ColdStartICW state, if no incident causes the transitioninto CC_StartupListen beforehand; this is not a configuration parametergdMaxDrift Maximum drift offset between two node that TBD MT operatewith unsynchronized clocks over one communication cyclegdMedPropagationDelay The medium expected propagation delay of a TBD μT(not a global constant) signal (including transceiver delays, wiredelays and controller internal delays) in the cluster gdMinislot Theduration of a minislot  2-TBD MT gdMsActionPointOffset The offset of theaction point within the  1-TBD MT minislot gdNIT The duration of thenetwork idle time TBD-TBD MT gdStartup Upper limit for thelisten-timeout in gdStartup = gdCycle + gdMaxDrift MT CC_StartupListenstate (before a sync node is allowed to become a coldstart node). Seealso vdStartup. gdStaticSlot The duration of a static slot.  2-TBD MTgdSymbolWindow The duration of the symbol window  0-TBD MT gSyncNodeMaxThe maximum number of sync nodes allowed  0-16 — for this clustergdWakeup Upper limit for the listen-timeout in gdWakeup = gdStartup =gdCycle + gdMaxDrift MT CC_WakeupListen state (before a sync-Node isallowed to transmit the Tx-wakeup pattern); (this is not a configurationparameter) gdWakeupMaxCollision Duration of ‘active low’ on the bus thata TBD gdBit communication controller sending a Tx- wakeup patternaccepts during the idle phase of the pattern without re-entering theCC_WakeupListen state. gdWakeupPattern Maximal number of repetitions ofthe Tx- 15 — wakeup symbol to be sent during the CC_WakeupSend state ofany Node in the cluster. gdWakeupSymbolRxIdle The equivalent of 6 μsminus a safe part. TBD gdBit Min (Collisions, clock differences andother effects can deform the Tx-wakeup pattern.) To be used by thecommunication controller for the ‘idle’ part of the CheckRxWakeupSymboltest gdWakeupSymbolRxLow The equivalent of 6 μs minus a safe part. TBDgdBit (Active stars, clock differences and other effects can deform theTx-wakeup pattern.) To be used by the communication controller for the‘active low’ parts of the CheckRxWakeupSymbol testgdWakeupSymbolRxWindow The equivalent of 30 μs plus a safe part. TBDgdBit (Clock differences and other effects can deform the Tx-wakeuppattern.) To be used by the communication controller for theCheckRxWakeupSymbol test gdWakeupSymbolTxIdle The equivalent of 18 μs(rounded up). To be TBD gdBit used by the communication controller forthe transmission of the ‘idle’ part of the Tx-wakeup symbolgdWakeupSymbolTxLow The equivalent of 6 μs (rounded up). To be TBD gdBitused by the communication controller for the transmission of the ‘activelow’ part of the Tx-wakeup symbol gMacroPerCycle The configured durationof the cluster cycle in TBD MT macroticksgMaxWithoutClockCorrectionFatal Threshold concerning CCFC. Defines whenthe [gMaxWithout Number CC shall change from green or yellow into redClockCorrectionPassive-15] of even/ error state odd cycle pairsgMaxWithoutClockCorrect Threshold concerning CCFC. Defines when the  1-7Number onPassive CC shall change from green into yellow error of even/state odd cycle pairs gMsgIdFilter Indicates that Message ID filteringis used Boolean — within the cluster and that the first two bytes of thepayload segment contain Message ID data gNetworkManagementVectorLengthLength of the Network Management vector in  0-12 Bytes a clustergNumberOfMinislots The duration of the dynamic segment 0-TBD Mini slotsgNumberOfStaticSlots The number of static slots in the static 1-cSlotIDMax Slots segment. gOffsetCorrectionInitOut The maximum offsetvalue permitted for the TBD MT first offset correction inCC_IntegrationVCW state. (This constant is the basis for the calculationof the controller specific parameter (see pOffsetCorrectionInitOut))gOffsetCorrectionOut The maximum offset correction permitted. TBD MT(This constant is the basis for the calculation of the controllerspecific parameter (see pOffsetCorrectionOut)) gPayloadLengthStaticGlobally configured payload length of a static  0-payload legth Max2-byte frame words gRateCorrectionOut The maximum rate correctionpermitted (This TBD MT constant is the basis for the calculation of thecontroller specific parameter (see pRateCorrectionOut)) gStartupNoiseUpper limit for the start up listen timeout in TBD — the presence ofnoise. Expressed as a multiple of the cluster constant gdStartup.gSyncNodeMax The maximum number of sync nodes allowed  1-cSyncNodeMax —in the cluster gWakeupMax The maximum number of times that a Node TBD —in this cluster is permitted to attempt to send a Tx-wakeup pattern.gWakeupNoise Upper limit for the wakeup listen timeout in thegWakeupNoise = gStartupNoise — presence of noise. Expressed as amultiple of the cluster constant gdWakeup. this is not a configurationparameter! gWakeupPattern Number of repetitions of the Wakeup symbol 2-TBD —

[3022] Cluster-Wide Technology-Dependent Constants (The constants listedhere define implementation-specific restrictions. The specified valuesapply for the FlexRay bus guardian from Philips. Worst-case restrictionsapply to the whole cluster if bus guardian devices from differentsemiconductor vendors are mixed in a cluster.) Name Description RangeUnit gdBGMinMTNom Minimum nominal 1.0 μs MT period gdBGMInMTCorr Minimumcorrected 0.5 μs MT period gdBGMinBGTPeriod Minimum BGT period 0.25 μsgdBGMinPwMT Minimum MT pulse 0.4* — width (low or high) pdMTPeriodgdBGMinPwBGT Minimum BGT pulse 0.4* — width (low or high) pdBGTPeriod

[3023] Node Constants Name Description Range Unit pBGDynSegEnableIndicates that a bus guardian enables Boolean — transmission during thedynamic segment pBGMatEnable Indicates that a bus guardian enables theBoolean — application of the media access test during the symbol windowpBgsmDynSegDisabled Boolean — pBgsmSymWinDisabled Boolean —pBGSymWinEnable Indicates that a bus guardian enables Boolean —transmission during the symbol window pChannels number of channelssupported by the node  1-gChannels — (Note: there is also a clusterconstant gChannels) pClusterDriftDamping Cluster drift damping valueused in clock TBD μT synchronization to minimize accumulation ofrounding errors pdBgeDynamicDuration Duration of the BGE active phaseduring the  0-65534 MT BG dynamic segment pdBgeStaticDuration Durationof the BGE active phase during active  0-4095 MT static slotspdBgeSymbolDuration Duration of the BGE active phase during the  0-255MT BG symbol window pdBGMTPeriod Configured nominal Bus Guardian MTperiod TBD μs pdBGTPeriod Configured Bus Guardian BGT period TBD μspdCycleWithHistory Upper limit for timeout that covers a period,gdStartup MT which is large enough that any periodic transmission thatcomplies to the global communication schedule is visible for anunsynchronized node at least once (Note: this is not a configurationparameter) pdEISSymbCycleMax Slave node, maximal appearance interval forTBD MT the CC trigger pdEISSymbCycleMin Slave node, minimal appearanceinterval for TBD MT the CC trigger pDelayCompensationChA Value used tocompensate for reception delays μT on channel A pDelayCompensationChBValue used to compensate for reception delays μT on channel BpdExTrigCycleMax For the master node in an Event Triggered TBD MT Modesystem, maximal appearance interval for the CC trigger pdExTrigCycleMinMaster node, minimal appearance interval for TBD MT the CC triggerpdMasterEIStoEndOfNIT Master node, duration between reference point TBDμT in the EIS symbol and begin of next cycle (which is also the end ofNIT) pdSlaveEIStoEndOfNIT Slave node, duration between reference pointTBD μT in the EIS symbol and begin of next cycle (which is also the endof NIT) pdTSS Duration of the Transmission Start Sequence  1-15 gdBitpdWakeupPattern Number of repetitions of the Tx-wakeup  0-gdWakeup —symbol to be sent during the CC_WakeupSend Pattern state. pEdgeSamplesWidth of the edge detection window in the Bit TBD — Clock Alignmentprocedure pLatestTx The number of the last minislot in which  0-TBDMinislots transmission can start in the dynamic segment for therespective node pMaster Denotes that the node is configured as theBoolean — sync master in byteflight mode pMaxPayloadLength Maximumnumber of payload data bytes 12-127 2-byte stored in a message bufferwords pMicroOverheadPer The node-specific initial value of the node TBDμT CycleNom variable vRateCorrection pMicroPerMacroMax Maximum number ofmicroticks for one TBD μT macrotick pMicroPerMacroMin Minimum number ofmicroticks for one TBD μT macrotick pMicroPerMacroNom The nominal(uncorrected) number of TBD μT microticks in a macrotickpOffsetCorrectionInitOut Parameter determining the upper and lower TBDμT boundaries between the red and green areas of the clock offsetcorrection term, applied only the first time an offset correction termis available in CC_IntegrationVCW state, expressed in node-localmicroticks. pOffsetCorrectionOut = gOffsetCorrectionInitOut*pMicroPerMacroNom pOffsetCorrectionOut Parameter determining the upperand lower TBD μT boundaries between the red and green areas of the clockoffset correction term, expressed in node-local microticks.pOffsetCorrectionOut = gOffsetCorrectionOut * pMicroPerMacroNompRateCorrectionInitOut Parameter determining the upper and lower TBD μTboundaries for the initial rate correction allowed for rate adoptionduring CC_InitSync state pRateCorrectionOut Parameter determining theupper and lower TBD μT boundaries between the red and green areas of theclock rate correction term, expressed in node-local microticks.pRateCorrectionOut = gRateCorrectionOut * pMicroPerMacroNompSamplesPerBit The number of samples taken in the TBD — determination ofa bit value pSyncNode Indicates that the node is a sync node (syncBoolean — slot configured; connected to gChannels) pSyncSlot The numberof the static slot in which a sync  0-cSlotIDMax Slots frame shall besent, if a sync frame shall be sent. pVotingOffset Number of samplesskipped prior to the voting TBD — window in bit value votingpVotingSamples Numbers of samples used in bit value voting TBD —

[3024] Node Variables Name Description Range Unit IbgsmRule Localvariable for BG schedule monitoring BGE_X, — service BGE_ENABLED,BGE_DISABLED vBgsmError Variable indicating that the Bus GuardianBoolean — Schedule Monitoring service has detected an errorvBgsmErrorAck Variable allowing the host to acknowledge the Boolean —detection of a Bus Guardian Schedule Monitoring error vCCLR Thecalculated rate correction value or Boolean — calculated offsetcorrection value is beyond the specified limit vColdStartCount Counterfor number of cycles/transitions for 0-gColdStartMax — which the nodehas been in the coldstart path vColdStartInhibit Denotes that the nodeis not allowed to enter Boolean — coldstart path vCurrentSlot Number ofthe current slot. Note that this is 1-cMaxStaticSlot slots slightlydifferent to fFrameID as it is independent of frame reception. vCycleCycle counter of the current communication 0-gCycleMax — cyclevdCycleWithHistory Timeout counter that covers a period, which is0-pdCycleWithHistory MT large enough that any periodic transmission thatcomplies to the global communication schedule is visible for anunsynchronized node at least once vdInitialColdStartPhase Timer for theperiod for which a node remain 0-gdInitialColdStartPhase MT inCC_ColdStartICW state, if no incident causes the transition intoCC_StartupListen beforehand vdStartup Listen-timeout (counter) inCC_StartupListen 0-gdStartup MT state vdStartupNoise Listen-timeout(counter) with noise in 0-pdStartupNoise * gdStartup MT CC_StartupListenstate vdWakeup Listen-timeout (counter) in CC_WakeupListen 0-gdWakeup MTstate for fast Wakeup. vdWakeupNoise Listen-timeout (counter) inCC_WakeupListen 0-gdWakeupNoise * gdWakeup MT state. vErrorHandlingLevelCurrent Error Handling Level [Green, Yellow, — Red] vGloNMVec Thenetwork management vector provided by Bit vector of 12 bytes — the CHIservice “network management” vInvalidSyncCount[ch] Counters for invalidSYNCFrame_(StartupVCW) 0-31 — decisions; assigned per channelvListenOnly Denotes that the node is not allowed to Boolean — transmitvMacrotick Macrotick counter, number of the current TBD MT macrotickvMeasureChx Measure time; time difference between the TBD expected andthe observed arrival time of a frame with respect of run timecompensation vMicroPerMacroCorr Actual number of microticks during thecurrent TBD μT (corrected) macrotick. The value of vMicroPerMacroCorrcan change from macrotick to macrotick in a cycle. vMicrotick Microtickcounter, number of the current TBD μT microtick vMOCS The calculation ofan offset correction value TBD Boolean was not possible in the clocksynchronization mechanism vMRCS The calculation of a rate correctionvalue was TBD Boolean not possible in the clock synchronizationmechanism vNoise Denotes that coldstart path has been entered Boolean —due to the expiration of pdStartupNoise vObservedArrivalTimeChx Timewhen a frame arrived TBD TBD vOffsetCorrection Signed integer indicatingthe number of TBD μT microticks the node should shift the start of itscommunication cycle. VoffsetCorrectionExternal External correction termfor the offset TBD μT correction vOffsetOut Denotes that the applicationof the extended Boolean — limit setting for the offset correction termcheck is prohibited vRateCorrection Rate correction value; number ofmicroticks TBD μT which should the added or subtracted from acommunication cycle vRateCorrectionExternal External correction term forthe rate correction TBD μT vRefSync The identifier of the sync framewhich was 0-4095 — originally used to enter the integration pathvRxSymbol Denotes which symbol was received during the [no_symbol, —symbol window SNS, SAS, MTS] vSlotCounter[ch] Slot counter for channelch 0-cSlotIDMax Slots vsMeasureEvenList List of the time differencevalues (observed TBD μT time minus expected time) measured for syncframes received during an even cycle. (Note: If valid sync frames arereceived on both channels the list entry corresponds to the differencevalue associated with the earlier sync frame (after taking delaycompensation into account) vsMeasureOddList List of the time differencevalues (observed TBD μT time minus expected time) measured for syncframes received during an odd cycle. vSMMS Indicates that the CC hasreceived a set of TBD Boolean sync frames during protocol startup phasethat did not result in a majority of the sync frames agreeing with thelocal view of the system time vSyncPairs The number of correspondingsync pairs 0-gSyncNodeMax — gathered during the rate measurement phaseand available for calculation of the rate correction term vTxSymbolDenotes which symbol is to be transmitted [no_symbol, — during thesymbol window SNS, SAS, MTS] vValidSyncCount[ch] Counters for validSYNCFrame_(StartupVCW) 0-gSyncNodeMax — decisions; assigned per channelvValidSyncFrameCount Counter for valid SYNCFrame_(StartupPCW) decisions0-cSyncNodeMax — per slot during gdPlausibilityCheckWindow vWakeupStatus flag indicating the abort of wakeup due TBD — SymbolReceived to areceived Rx-wakeup symbol. vWakeupChannel Variable that defines whichchannel shall be TBD — woken. It captures the value of the ‘Wake UpChannel Select’ control bit. vWakeupComplete Status flag indicating thetransmission of a Tx- TBD — wakeup pattern. vWakeupCount Counter fornumber of attempts to transmit Tx- 0-gWakeupMax — wakeup patterns.vWakeupFailed Status flag indicating the abort of wakeup due TBD — togWakeupMax aborted attempts to send a Tx- wakeup pattern. vWakeupFrameStatus flag indicating the abort of the wakeup TBD — HeaderReceived dueto a frame header.

[3025] Frame Variables Name Length Description fCycleCount 6 Cycle countfData 0 . . . 2032 Data fData[x] 8 Byte x of the data from fFrameDatafFrameCRC 24 Frame CRC fFrameID 12 Frame ID fHeaderCRC 11 Header CRCfLocNMVec 96 Network management vector extracted from the frame'spayload section if fNMIndicationBit is set to one fMessageID 16 MessageID fNMIndicationBit 1 Network management indication bitfNullFrameIndicationBit 1 Null frame indication bit fPayloadLength 7Payload length fReservedBit 1 Reserved bit fSyncBit 1 Sync bit

[3026] Event Indications Name Description Range Unit S_CASReceptionIndicates the reception of a valid CAS symbol on one Event — of theconfigured channels S_ChannelIdleCodingError Event — S_CorrectFrameIndicates the reception of a syntactically correct Event — frame thatsuccessfully passed all frame reception criteria S_CycleCounterErrorEvent — S_CycleCountError Indicates the violation of the correspondingstatic Event — segment acceptance criterion S_CycleCountError Event —S_EmptySlot Event — S_FrameCodingError Event — S_FrameIDError Indicatesthe violation of the corresponding static Event — segment acceptancecriterion S_FrameIDError Event — S_HeaderCodingError Event —S_IllegalNullFrame Event — S_IllegalSyncBit Event — S_InvalidDTSErrorEvent — S_InvalidFrameCRCError Event — S_InvalidFrameLengthError Event —S_InvalidHeaderCRCError Event — S_PayloadLengthError Event —S_PayloadLengthStaticError Denotes the violation of the correspondingstatic Event — segment acceptance criterion S_SuccessfulHeaderReceptionDenotes the reception of a frame header on one of Event — the configuredchannels S_TransmissionConflictError Event — S_Trig_Symb_Failure Eventindication symbol Failure Event — S_TSSError Event —S_ValidEvenStartupFrame Denotes the reception of a sync frame with aneven Event — fCycleCount that passed the startup acceptance criteriaS_ValidFrame Event — S_ValidOddStartupFrame Denotes the reception of async frame with an odd Event — fCycleCount that passed the startupacceptance criteria S_ValidStartupFrame Denotes the reception of a syncframe that passed Event — the startup acceptance criteria

[3027] Glossary

[3028] In the following glossary some of the terms used for thedescription of the present invention are defined. μT MicrotickApplication Data Data produced and/or used by application tasks. In theautomotive context the term ‘signal’ is often used for application dataexchanged among tasks. BCA Bit Clock Alignment BD Bus Driver BDeElectrical Bus Driver BDo Optical Bus Driver BF byteflight (protocolmode) BG Bus Guardian BGME Bus Guardian Schedule Monitor Error (errorsignal) BGSM Bus Guardian Schedule Monitor BSD Bit Stream Decoding BSSByte Start Sequence Bus A communication channel in bus topology.Sometimes the word “bus” is used as synonym for communication channel.byteflight Communication network developed by BMW AG, Motorola, ELMOS,Infineon, Siemens EC, Steinbeis Transferzentrum furProzessautomatisierung, and IXXAT. CAS Collision Avoidance Symbol CCCommunication Controller - The device that implements the FlexRayprotocol CCFC Clock Correction Failed Counter CCLR Clock CorrectionLimit Reached (error signal) CCMS Coldstart Count Maximum Signal (errorsignal) Channel Idle The condition of medium idle as perceived by eachindividual node in the network. CHI Controller Host Interface Cluster Acommunication system of two or more nodes connected via at least onecommunication channel directly (bus topology) or by star couplers (startopology). Communication The inter-node connection through which signalsare conveyed for the Channel purpose of communication. The communicationchannel abstracts both the network topology, i.e. bus or star, as wellas the physical transmission medium, i.e. electrical or optical. CRCCyclic Redundancy Code CSEI Channel Status and Error Information CycleTime Time for one communication cycle. DTS Dynamic Trailing SequenceDynamic Segment Portion of the communication cycle where the mediaaccess is controlled via a mini-slotting scheme, also known as FlexibleTime Division Media Access (FTDMA). During this segment access to themedia is dynamically granted on a priority basis to nodes with data totransmit. Dynamic Slot Variable duration unit used to control mediaaccess in the dynamic segment of a communication cycle. A dynamic slotis comprised of one or more minislots, as determined by the minislotFTDMA/ minislot media access scheme. The duration of a dynamic slot canvary from slot to slot in a given cycle, and from cycle to cycle for agiven slot. Only one node may transmit in any given dynamic slot/channel combination. EIS Event Indication Symbol ET Event Triggered(protocol mode) FES Frame End Sequence FIFO First In, First Out (databuffer structure) Frame A structure used by the communication system toexchange information within the system. A frame consists of a headersegment, a payload segment and a trailer segment. The payload segment isused to convey application data. FSEI Frame Status and Error InformationFTDMA Flexible Time Division Multiple Access (media access method). Thisis another name for the minislot based media access method. HammingDistance The minimum distance (i.e., the number of bits which differ)between any two codewords in a binary code ICW Initial Check WindowMacrotick Unit of time derived from the cluster-wide clocksynchronization algorithm. A macrotick consists of an integral number ofmicroticks - the actual number of microticks in a given macrotick isadjusted by the clock synchronization algorithm. The macrotickrepresents the smallest granularity unit of the global time. Medium IdleThe condition of the physical transmission medium when no node isactively transmitting on the physical transmission medium Microtick Unitof time derived directly from the CC's oscillator. The microtick is notaffected by the clock synchronization mechanisms, and is thus anode-local concept. Different nodes can have microticks of differentdurations. Minislot Fixed duration unit of time that is used to controlthe minislot/ FTDMA media access scheme in the dynamic segment. Aminislot consists of a configurable number of macroticks. All minislotsin a cycle have the same duration (expressed in macroticks), and thisduration is constant from cycle to cycle. MOCS Missing Offset CorrectionSignal (error signal) MRCS Missing Rate Correction Signal (error signal)MT Macrotick MTS Media Access Test Symbol Network Topology Thearrangement of the connections between the nodes. FlexRay supports botha bus network topology and a multiple star network topology. NIT NetworkIdle Time NM Network Management Node A device connected to the networkthat is capable of sending and/or receiving frames. NRZ Non-Return toZero (method of encoding) Physical An inter-node connection throughwhich signals are conveyed for the Communication purpose ofcommunication. All nodes connected to a given Physical LinkCommunication Link share the same electrical or optical signals (i.e.,they are not connected through repeaters, stars, gateways, etc.).Examples of a Communication Physical Link include a bus network, or apoint-to-point connection between a node and a star. A CommunicationChannel may be constructed by combining one or more PhysicalCommunications Links together using stars. SAS Status Alarm Symbol SlotEither a Static Slot or Dynamic Slot, depending on context. SMMS StartupMajority Missed Signal (error signal) SNS Status Normal Symbol Star Adevice that allows information to be transferred from one physicalcommunication link to one or more other physical communication links. Astar duplicates information present on one of its links to the otherlinks connected to the star, allowing clusters to be built from nodessupporting only point-to-point connections. A star can be either passiveor active. Static Segment Portion of the communication cycle where themedia access is controlled via a static Time Division Media Access(TDMA) scheme. During this segment access to the media is determinedsolely by the passage of time. Static Slot Fixed duration unit of timethat is used to control media access in the static segment of acommunication cycle. All static slots in a cycle have the same duration(expressed in macroticks), and this duration is constant from cycle tocycle. Only one node may transmit in any given a static slot/channelcombination. Sync Frame FlexRay frame whose header segment containsinformation that indicates that the deviation measured between theframe's arrival time and its expected arrival time should be used by theclock synchronization algorithm. TBD To Be Determined TDMA Time DivisionMultiple Access (media access method) TSS Transmission Start SequenceTT-D Time Triggered Distributed Synchronization (protocol mode) TT-MTime Triggered Master Controlled Synchronization (protocol mode) VCWValidation Check Window WUS Wakeup Symbol

We claim:
 1. A method for transmitting data within a communicationsystem, the communication system comprising a communication media and anumber of nodes connected to the communication media, the methodcomprising the step of: transmitting the data across the communicationmedia within a communication cycle comprising a number of time slotsassigned to one or more nodes of the communication system, wherein saidcommunication cycle is initiated by an event.
 2. The method of claim 1,wherein said event is external.
 3. The method of claim 1, wherein saidevent is internal.
 4. The method of claim 1, wherein one of the nodes ofthe communication system is defined as a master node which initiatessaid communication cycle in conjunction with a predetermined triggersignal.
 5. The method of claim 4, wherein said master node receives saidtrigger signal.
 6. The method of claim 4, wherein said master nodegenerates said trigger signal.
 7. The method of claim 4, whereinexecution of said communication cycle is suspended until said masternode receives said trigger signal.
 8. The method of claim 4, whereinexecution of said communication cycle is suspended until said masternode generates said trigger signal.
 9. The method of claim 4, whereinexecution of said communication cycle is suspended until a predeterminedperiod of time has elapsed.
 10. The method of claim 4, wherein saidmaster node issues an event indication signal (EIS) upon receipt orgeneration of said trigger signal, the other nodes of the communicationsystem being defined as slave nodes which receive said event indicationsignal and which resume execution of said communication cycle uponreception of said event indication signal.
 11. The method of claim 10,wherein said communication cycle comprises a cycle gap into which saidnodes enter to suspend execution of said communication cycle, whereinsaid master node issues said event indication signal and said slavenodes receive said event indication signal to resume execution of saidcommunication cycle.
 12. The method of claim 10, wherein said eventindication signal is used for synchronizing said slave nodes.
 13. Themethod of claim 12, wherein said event indication signal is defined as alow/high/low sequence, wherein a high/low transition is used as asynchronizing event for said slave nodes.
 14. The method of claim 12,wherein a first valid reception of said event indication signal by oneof said slave nodes is used for synchronizing said slave nodes.
 15. Themethod of claim 4, wherein said trigger signal is generated in saidmaster node.
 16. The method of claim 4, wherein said trigger signal isapplied to said master node from a unit external to said master node.17. The method of claim 4, wherein said communication cycle comprises astatic segment with time slots of a predefined size and in a predefinedorder.
 18. The method of claim 4, wherein said communication cyclecomprises a dynamic segment with time slots for transmitting a variablenumber of frames of variable length and variable order.
 19. A computerprogram for execution on at least one of a computer and amicroprocessor, wherein the computer program is programmed to executethe method of claim
 1. 20. The computer program of claim 19, wherein thecomputer program is stored in one of a read-only-memory (ROM), arandom-access-memory (RAM), and a flash-memory.
 21. One of a number ofnodes of a communication system, the nodes being connected to acommunication media for transmitting data among the nodes, the databeing transmitted across the communication media within communicationcycles each communication cycle comprising a number of time slotsassigned to one or more nodes of the communication system, said nodecomprising: means for receiving an event; and means for initiating acommunication cycle upon receipt of said event.
 22. The node of claim21, wherein said event receiving means accommodate a predefined triggersignal, wherein said means for initiating said communication cycleinitiate said communication cycle upon receipt of said trigger signal.23. The node of claim 22, wherein the node comprises means forinternally generating said trigger signal.
 24. The node of claim 22,wherein the node comprises input means for receiving said trigger signalfrom a unit external to the node.
 25. The node of claim 21, wherein thenode comprises means for executing the method of claim
 1. 26. Acommunication system comprising: a communication media; and nodesconnected to said communication media, wherein data is transmitted amongsaid nodes across said communication media within communication cycles,each communication cycle comprising a number of time slots assigned toone or more nodes of the communication system, wherein said nodescomprise means for receiving an external or an internal event and meansfor initiating said communication cycle upon receipt of said external orinternal event.
 27. The communication system of claim 26, wherein thecommunication system comprises means for executing the method of claim4.